-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: Upgrade to GHC 9.4.5. #883
Conversation
bd6f7c7
to
21abe4a
Compare
I think we are failing to build because of haskell/haskell-language-server#3427 (which was fixed for hls-1.9.0.0 and closed, but then happened again for hls-1.9.1.0, and has had recent activity). Hopefully this can get fixed upstream/with a hackage revision. I've pushed a commit reverting to hls-1.9.0.0 to see if CI gets further (This does not bite us with ghc-9.2 since haskell.nix disables the problematic plugin for specific ghc versions: https://github.com/input-output-hk/haskell.nix/blob/cedc461a69179a18f75158fbb3045d21ebbfabc6/modules/hackage-quirks.nix#L66) |
Strangely, the fourmolu build seems to be segfaulting when linking on aarch64-darwin
We have seen segfaults building fourmolu on this platform before: #694 (comment) |
The |
This time seems more persistent. I have retried multiple times, and the failure is always the same. Perhaps we finally have a reproducer? (Though I notice that it always tries to build on mac-builder-c, so maybe there is something odd with that machine?) |
No, it's happening on the other Mac builder, and now on my own Mac, as well. I think we should just cut our losses and switch to |
I'd be surprised if Ormolu doesn't exhibit the same issue, since I can't think of anything relevant that Fourmolu changes. Is this related to NixOS/nixpkgs#196781? |
A very similar issue was reported upstream: fourmolu/fourmolu#238 @georgefst You marked this as completed, but it doesn't appear it was ever properly addressed in |
Also, Should we try the same? |
Yes, possibly. I didn't realize why are we still seeing it in the latest release of edit: supposed to have been resolved in HLS as well: haskell/haskell-language-server#3400 |
According to the changelogs (Ormolu, Fourmolu), the problematic
Yes, although maybe I shouldn't have done so until the upstream fix was merged.
Yes, that should fix it, and might be the simplest thing in the short-term. |
OK, thanks. We can chill a bit longer and wait for the new In the meantime, there's a strange Weeder issue that only appears to affect |
Actually, it is a cborg issue, I believe well-typed/cborg#304 or well-typed/cborg#307 should fix it. I have pushed a commit grabbing the second one of these in |
I think that once |
Sounds good to me. One possible refinement would be to gate the weeder check on |
haskell/haskell-language-server#3427 (comment) implies that hls-1.9.1.0 should now work (at least, after haskell.nix picks up the new revision from hackage), so I expect we can just drop that commit. |
This seems to have been fixed as of hls hackages revision 1.
I suspect we can drop this commit when we bump haskell.nix |
This appears to be ready to go, finally. We have to build HLS from |
I'll wait for the saturated constructor PRs, then merge this. Then I'll move on to GHC 9.6.1. |
Also, we do the following: * Upgrade to fourmolu 0.12.0.0 and tell it not to put parens around standalone unary constraints, for compatibility with hlint. * Run a formatting pass to conform to fourmolu's new formatting. * Build HLS from source. It doesn't currently build as a haskell.nix tool with GHC 9.4.5, and we need to build it from git, anyway, in order to get support for fourmolu 0.12.0.0. * Disable weeder, which doesn't currently build as a haskell.nix tool with GHC 9.4.5, and also fails to build on aarch64-darwin. * Remove hie.yaml, as HLS once again seems able to operate without it. Note: the definition of `type (<=)` changed in ghc-9.4 such that it uses its arguments twice each. Thus `instance x <= y => C x y where ...` is rejected, since the constraint is a type synonym which expands to something like `instance Assert (x <=? y) (LeErrMsg x y) => C x y where` and this fails the Paterson Conditions: https://downloads.haskell.org/ghc/9.4.4/docs/users_guide/exts/instances.html#instance-termination-rules Using UndecidableInstances lifts these restrictions, satisfying GHC.
Also, we do the following:
Upgrade to fourmolu 0.12.0.0 and tell it not to put parens around
standalone unary constraints, for compatibility with hlint.
Run a formatting pass to conform to fourmolu's new formatting.
Build HLS from source. It doesn't currently build as a haskell.nix
tool with GHC 9.4.5, and we need to build it from git, anyway, in
order to get support for fourmolu 0.12.0.0.
Disable weeder, which doesn't currently build as a haskell.nix tool
with GHC 9.4.5, and also fails to build on aarch64-darwin.
Remove hie.yaml, as HLS once again seems able to operate without it.
Note: the definition of
type (<=)
changed in ghc-9.4 such that ituses its arguments twice each. Thus
instance x <= y => C x y where ...
is rejected, since the constraint is a type synonym which expandsto something like
instance Assert (x <=? y) (LeErrMsg x y) => C x y where
and this fails the Paterson Conditions:https://downloads.haskell.org/ghc/9.4.4/docs/users_guide/exts/instances.html#instance-termination-rules
Using UndecidableInstances lifts these restrictions, satisfying GHC.