-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flip ghc-lib default to True #1385
Conversation
it looks like macos CI is struggling with errors of this kind?
this is a known GHC issue (see more about this here). tl;dr a workaround while it's not fixed upstream is to execute build commands in an environment in which |
cmd="cabal new-build all -j --ghc-option=-j"
ghc_version=$(ghc -V | tail -c 6)
if [[ "$ghc_version" == "9.2.2" ]]; then
eval "C_INCLUDE_PATH=$(xcrun --show-sdk-path)/usr/include/ffi" "$cmd"
else
eval "$cmd"
fi disclaimer: i'm not much cop at bash so i have no idea if it's good code or not!) this is resolved with ghc-9.2.3 however (https://gitlab.haskell.org/ghc/ghc/-/issues/20592#note_435963) so maybe the best resolution is to ghcup that one. |
Stack has moved to GHC 9.2.3 for its nightly. Shayne, can you push a rebase so I can get fresh signal on the CI. If github via ghcup has moved to 9.2.3 I think we're good to land this, otherwise I think we might have to wait. |
8dda6a9
to
9a049f0
Compare
that's a shame. the ghc version continues to be ghc-9.2.2. |
sadly we are looking stuck. i guess there's no provision afforded us by github where we can arrange our builds be executed in an environment that sets |
I have no doubt we can fix the CI builds. What I worry is about having CI as a signal for end users, where HLint might no longer compile. |
i've got a build running in #1396 that
so far it's looking good. if it goes through would you consider this a fix? |
i think i'm hearing your concern as being users encountering this error in the wild when building hlint? if so, yes, the only "fix" i know we have for that are workarounds that set i wonder if this isn't already a problem for users on the current version of hlint (e.g. this report digital-asset/ghc-lib#352). i simply don't know. |
argh, of course it is not. mac-OS/ghc-9.2.2 with the current version of hlint will (default) build depend on |
fwiw, macOS/ghc-9.2.3 builds with the changes of this diff have succeeded. making this modification to |
9a049f0
to
14d9f20
Compare
14d9f20
to
63aebe4
Compare
given #1410 has been accepted which contains this change, i am abandoning this PR. |
Summary:
ghc-lib
default toTrue
(i.e. disable 'auto' mode; unconditionally linkghc-lib-parser
)ghc-lib-parser-ex-9.2.1.0
(which has the same link behavior with respect toghc-lib-parser
)Test plan:
(1) Execute
stack build --resolver nightly-2022-05-27 --cabal-verbose
(i.e. ghc-9.2.2). Observe,This shows that
ghc-lib-parser
is linked and not ghc libs despite the compiler version being >=9.2.2 && <9.3.(2) Enable in
stack.yaml
the stanzaand execute
stack build --resolver nightly-2022-05-27 --cabal-verbose
. Observe now,This shows that with the default flags overridden we can recover the "old" behavior of linking the the native ghc libs rather than
ghc-lib-parser
when the compiler version is >= 9.2.2 && < 9.3