-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cannot build HLS for ghc 9.0.1. error: attribute 'haskell-language-server' missing. #5
Comments
Yeah, I haven't tried to take on a 9.0.1 build yet, so it's not surprising that there's hiccups. Still, the upstream HLS project supports it. And Haskell.nix also suppports 9.0.1. So I think you're right that it's not not unreasonable to try to get this working. Two thoughts. First, when I get to it, it might not actually be that hard. Maybe it's just a matter of upgrading dependencies... like getting the latest Haskell.nix and also updating the timestamp I'm pinning Hackage to. That's typical stuff I have to do when maintaining this project. Second, though flake builds are supported by HLS upstream, I'm not convinced they build cleanly for all versions of GHC. If they do, then I'd love for someone to show me the invocation that does that (I see derivations that look like they should build, but to date they haven't worked for me for all GHC versions advertised). Because if flakes can do everything, the motivation of using Haskell.nix attenuates strongly for me. It's a bit more maintenance that I care for myself. Though I've found this project useful in the interim thus far. |
I've tried to build HLS directly and it works, I think it's because in their I haven't fully understand this project yet so don't know if the causes are the same or how to fix it, but if it's the case, updating the timestamp of Hackage probably wouldn't change much. Hope this helps. |
You're right that they are pinning dependencies. But they are doing something else too. They are disabling a whole bunch of plugins too that are not ready for 9.0.1. They do this in the upstream And there's an open issue tracking this all (haskell/haskell-language-server#297). So... I could try to reproduce this all in my Haskell.nix-based build. The good part about Haskell.nix is that it's largely driven by the Cabal files. Haskell.nix just has a few configurations for specifying either a Maybe that's worth it? Or... I might be lazy and just wait for 9.0.1support to flush through upstream? Not sure just yet. |
Okay, I put in a couple of hours seeing if I could get this compiling. While I was able to do two more simple things (not build the plugins and put in Cabal flags disabling the dependence on these plugins)... there were still dependencies that needed special attention beyond the latest in Hackage. At that point, I lost steam. Also, just getting the other GHC versions to build is also proving tedious, and I feel more committed to supporting them. But I welcome anyone else to give this a shot and put up a PR. In the meantime, I'm going to pass on worrying and 9.0.1 for now, and wait for some improved situation upstream. |
After running
nix-env --install --file . \ --attr hls-renamed \ --attr hls-wrapper-nix \ --attr cabal-install \ --attr stack \ --attr implicit-hie \ --attr direnv \ --attr direnv-nix-lorelei \ --attr ghc
I successfully installed the hls-wrapper-nix and HLS targeting ghc 8.10.4.
But when I want to install a HLS targeting ghc 9.0.1:
At first I would get following error messages:
After running
updateMaterialized
as it's suggested and trying to install HLS for ghc 9.0.1 again, I get other errors:It seems that the newest
hie-bios
on hackage doesn't support ghc 9.0.1, could there be any workarounds to usehie-bios
on master branch instead?The text was updated successfully, but these errors were encountered: