You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes a bug I encountered where NVF's pinned nixpkgs drifted far enough out of sync with one of my haskell project's pinned nixpkgs that the NVF-supplied HLS and my shell-supplied GHC stopped playing nicely together.
From the block comment I left in source:
HLS binaries are incredibly picky about which GHC version they run against
-- even failing between two GHC builds with identical version numbers, because one has a newer ABI.
Because of this, we shouldn't assume our provided HLS version is the right
one for a given project. Appending to PATH with `--suffix` takes advantage
of PATH's first-match lookup, so an existing HLS already in
the user's dev environment is found first and takes precedence over ours.
This way we provide a useful default without clobbering existing setups.
I can confirm that using --suffix no longer clobbered the HLS supplied by my dev shell, and all my haskell tooling worked as expected again.
btw you could also just modify vim.languages.haskell.extensions.haskell-tools.setupOpts.hls.cmd = ["haskell-language-server" "--lsp"] directly for your config, to not ship a hsl with your nvf config.
We generally prefer not using the PATH provided bins in NVF, but instead nix managed versions.
If people want to use the versions from their PATH, that is fine, but shouldn't really become default in nvf IMO.
perhaps a good time to revisit #1180 (comment)
(raf agreed to add a toggle for using either PATH or builtin, but I don't think we really talked about PATH+builtin fallback)
suffixing goes against the rest of nvf so someone else might trip over that thinking the nvf hls has priority, so I don't think that's the way to go
I think i'd rather keep the current behavior till we add said toggle for #1180
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bug I encountered where NVF's pinned nixpkgs drifted far enough out of sync with one of my haskell project's pinned nixpkgs that the NVF-supplied HLS and my shell-supplied GHC stopped playing nicely together.
From the block comment I left in source:
I can confirm that using
--suffixno longer clobbered the HLS supplied by my dev shell, and all my haskell tooling worked as expected again.Sanity Checking
nix fmt).#nix(default package).#maximal.#docs-html(manual, must build).#docs-linkcheck(optional, please build if adding links)x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwinAdd a 👍 reaction to pull requests you find important.