Skip to content
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

haskellPackages.haskell-language-server: Add aliases with ghc version #98504

Merged
merged 1 commit into from Sep 23, 2020

Conversation

maralorn
Copy link
Member

Needed by haskell-language-server-wrapper to discover the correct
binary. Especially useful when installing hls from multiple ghc version.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Needed by haskell-language-server-wrapper to discover the correct
binary. Especially useful when installing hls from multiple ghc version.
@teto
Copy link
Member

teto commented Sep 22, 2020

do we still need the wrapper with nix ? The advantage of nix means you shouldn't have several versions available at the same time.

@maralorn
Copy link
Member Author

Well, if people install just haskell-language-server and ghc from pkgs.haskellPackages, yeah, they are fine.

But imagine they have a project with a ghc 8.6.5 in one nix-shell, another one with 8.10.2 in the next but by default they have haskell-language-server with 8.8.4 installed. If people want to install hls globally but work with different ghcs in different projects they need the wrapper.

My next step is if we can maybe activate hydra-builds for haskell.packages.ghcxxx.haskell-language-server. Like we do with pandoc or stack. Then maybe users can install hls flexibly for all versions they need.

Copy link
Member

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super familiar with haskell-language-server, but we have aliases for ghc, so I think it makes sense to have aliases for haskell-language-server as well.

It sounds like haskell-language-server is tied to a certain version of GHC, so it makes sense that users may want to install different versions of haskell-language-server all at the same time, the same way you can install different versions of GHC all at the same time.

This PR LGTM.

@teto
Copy link
Member

teto commented Sep 23, 2020

I can imagine several scenarios where this is useful, just wanted to point out that this may not be the nix spirit per se. LGTM.

@maralorn maralorn merged commit 108e8bc into NixOS:haskell-updates Sep 23, 2020
@maralorn maralorn deleted the hls-version-alias branch September 23, 2020 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants