Unbreak ghcide and bump haskell-lsp version#75449
Unbreak ghcide and bump haskell-lsp version#75449turion wants to merge 4 commits intoNixOS:haskell-updatesfrom
Conversation
da9ccdc to
7461625
Compare
There was a problem hiding this comment.
In general, the Haskell stuff in nixpkgs tracks the latest LTS release. We don't override these package versions with our own updated versions (since this could break a lot of stuff).
If you look at the top of this list here, you can see that these packages are locked to versions from the latest LTS. (peti updates these weekly, you can watch live if you're interested: https://www.twitch.tv/peti343)
It appears that the latest version of ghcide requires haskell-lsp ==0.17.*, haskell-lsp-types ==0.17.*, which is later than the version from LTS-14.
However, hackage2nix generates the latest versions of packages in the LTS as well, so haskellPackages.haskell-lsp_0_18_0_0 and haskellPackages.haskell-lsp-types_0_18_0_0 should be available.
I suggest trying to override ghcide to use these two package versions and then jailbreaking the cabal file.
Here's an example of hnix overriding package versions as well as using doJailbreak:
nixpkgs/pkgs/development/haskell-modules/configuration-common.nix
Lines 230 to 233 in 63f6681
Could you update this PR to remove the above lines from configuration-hackage2nix.yaml, and instead adding an entry for ghcide to configuration-common.nix?
There was a problem hiding this comment.
I suggest trying to override ghcide to use these two package versions and then jailbreaking the cabal file.
Oh, and let me know if this doesn't work. There is a way to force hackage2nix to generate arbitrary package versions (so we could make it generate haskellPackages.haskell-lsp_0_17_0_0 for ghcide).
There was a problem hiding this comment.
Thanks for your explanations! Do I have to run hackage2nix locally to test my changes?
There was a problem hiding this comment.
@turion No, peti runs hackage2nix locally, so you don't have to do it in this PR.
There was a problem hiding this comment.
Unfortunately ghcide does not build with haskell-lsp-0.18. We probably need to make a haskellPackages.haskell-lsp_0_17_0_0 , but I don't know how. In parallel, I'll start and (send a PR to) upgrade ghcide to build with a newer haskell-lsp.
There was a problem hiding this comment.
I see. I'm working towards 1. then first :)
There was a problem hiding this comment.
ghcide with haskell-lsp-0.18 is released. I don't really understand how this change gets here. Do I just wait and rebase?
There was a problem hiding this comment.
I don't really understand how this change gets here.
I think there is an automatic script that updates the haskell-updates branch with recent package versions from Hackage. (Or maybe it is semi-automatic and peti has to run it by hand)
You can see the current state of haskell-updates here (including a bunch of commits with the message hackage-packages.nix: automatic Haskell package set update):
At some point (maybe today or tomorrow?) one of these Haskell package set updates should contain the new version of ghcide. At that point you should be able to rebase this PR on haskell-updates and use the new version of haskell-lsp.
There was a problem hiding this comment.
Ok. Thanks for all your explanations!
Is this whole workflow documented somewhere? Just in case peti goes on a 2 month vacation and someone needs to pick up the reign ;)
There was a problem hiding this comment.
It is somewhat documented in the hackage2nix Readme:
https://github.com/NixOS/cabal2nix/tree/master/hackage2nix
There is also a youtube video showing the steps:
https://www.youtube.com/watch?v=qX0mgtSm360
Also, peti streams live these updates, so if you watch him doing it once or twice, you should get a good idea of how to do it:
https://discourse.nixos.org/t/please-join-the-new-weekly-haskell-updates-video-livestream/4420
14b0fb3 to
9c01e12
Compare
peti
left a comment
There was a problem hiding this comment.
Can you please re-base this PR on top of a current version of haskell-updates to resolve the merge conflicts?
This update was generated by hackage2nix v2.15.0-9-g650d530 from Hackage revision commercialhaskell/all-cabal-hashes@dc5b0e7.
3814616 to
8bee1b9
Compare
@peti Yes, since the conflicts are only internal to |
|
Another dependency, |
Seems nontrivial to fix. I'll add |
7461625 to
6417091
Compare
|
Fixing |
|
I'm a bit out of ideas. The upstream version for |
|
@turion You are discovering why people use |
|
@turion What you can do is send a PR adding a line to this list: nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml Lines 2475 to 2536 in c8c7398 like - haskell-lsp == 0.18.0.0 # for ghcide-0.4 (or whatever is the correct ghcide version)Once this gets merge into You should be able to use this package in an override to |
Hehe, yes ;) but I haven't given up on |
|
@cdepillabout I guess I could, but this is quite a manual and tiresome cycle. I'll just wait until upstream has released a new version. https://github.com/digital-asset/ghcide/issues/277 This whole workflow feels like it's going to break every time e.g. |
|
@turion Sorry this is somewhat of a manual/annoying process.
For the most part, yes.
There are some cases where the situation would stabilize:
Unfortunately, the Haskell stuff in nixpkgs doesn't work too well for new packages that aren't in Stackage and have frequent releases to Hackage. As suggested by mpickering, creating an overlay with known package versions (or using a tool like Creating a |
|
@cdepillabout Thank again you for your detailed explanations! It certainly helps me to understand the process and to more effectively contribute.
Ah, good point! So LTS in Haskell on |
|
I have attempted to fix the |
6484351 to
1f79abf
Compare
|
This is why I maintain https://github.com/hercules-ci/ghcide-nix |
1f7024e to
7d2cc64
Compare
|
@turion, do you still intend to update this PR? Or can it be closed? |
d3a751a to
aa46cdd
Compare
aa46cdd to
fdd64fb
Compare
Motivation for this change
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"./result/bin/)nix path-info -Sbefore and after)Notify maintainers
cc @