-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
ghcide: remove redundant env NIX_GHC_LIBDIR #2819
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you test this change? Does it work?
Hey @pepeiborra, I am unsure of how to test this manually. Could you please guide me on how to do it if needed? I had run all the tests under the |
To test this you would need to install Nix, set up a Nix shell environment for developing a Haskell project, start HLS from the Nix environment and check that it works as expected. |
Hey @pepeiborra, I tried to set up the environment using nix, but when I try to build master(as well as this branch), I am facing this error.
Upon searching for a fix, I found that version 2.34 is only available with the unstable channel of nix. I tried to run the Is there any better way to encounter this issue? |
Can you be more specific about what you're doing? e.g. here's what I get:
Which looks like it's linking to 2.33, and it runs fine. What do you get? |
@michaelpj Here is what I get when I run the following commands Terminal logs
❯ nix develop
warning: updating lock file '/home/rush/Desktop/oss/haskell-language-server/flake.lock':
• Updated input 'hie-bios':
'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc='
→ 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk='
warning: Git tree '/home/rush/Desktop/oss/haskell-language-server' is dirty
nix-pre-commit-hooks: updating /home/rush/Desktop/oss/haskell-language-server repo
nix-pre-commit-hooks: WARNING: Refusing to install because of pre-existing .pre-commit-config.yaml
1. Translate .pre-commit-config.yaml contents to the new syntax in your Nix file
see https://github.com/hercules-ci/nix-pre-commit-hooks#getting-started
2. remove .pre-commit-config.yaml
3. add .pre-commit-config.yaml to .gitignore
[rush@rush haskell-language-server]$ cabal build
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
- ghcide-1.6.0.1 (lib) (file /home/rush/Desktop/oss/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.10.7/hie-compat-0.2.1.1/cache/build changed)
- hls-test-utils-1.2.0.0 (lib) (configuration changed)
- hls-tactics-plugin-1.6.1.0 (lib) (configuration changed)
- hls-stylish-haskell-plugin-1.0.1.0 (lib) (configuration changed)
- hls-splice-plugin-1.0.1.0 (lib) (configuration changed)
- hls-selection-range-plugin-1.0.0.0 (lib) (configuration changed)
- hls-retrie-plugin-1.0.2.0 (lib) (configuration changed)
- hls-rename-plugin-1.0.0.2 (lib) (configuration changed)
- hls-qualify-imported-names-plugin-1.0.1.0 (lib) (configuration changed)
- hls-pragmas-plugin-1.0.2.0 (lib) (configuration changed)
- hls-ormolu-plugin-1.0.2.0 (lib) (configuration changed)
- hls-module-name-plugin-1.0.1.0 (lib) (configuration changed)
- hls-hlint-plugin-1.0.3.0 (lib) (configuration changed)
- hls-haddock-comments-plugin-1.0.1.0 (lib) (configuration changed)
- hls-fourmolu-plugin-1.0.2.0 (lib) (configuration changed)
- hls-floskell-plugin-1.0.1.0 (lib) (configuration changed)
- hls-explicit-imports-plugin-1.0.2.0 (lib) (configuration changed)
- hls-eval-plugin-1.2.1.0 (lib) (configuration changed)
- hls-class-plugin-1.0.2.0 (lib) (configuration changed)
- hls-change-type-signature-plugin-1.0.1.0 (lib) (configuration changed)
- hls-call-hierarchy-plugin-1.0.2.0 (lib) (configuration changed)
- hls-brittany-plugin-1.0.2.0 (lib) (configuration changed)
- hls-alternate-number-format-plugin-1.1.0.0 (lib) (configuration changed)
- haskell-language-server-1.6.1.1 (lib) (configuration changed)
- hls-refine-imports-plugin-1.0.1.0 (lib) (configuration changed)
- haskell-language-server-1.6.1.1 (exe:haskell-language-server-wrapper) (configuration changed)
- haskell-language-server-1.6.1.1 (exe:haskell-language-server) (configuration changed)
- haskell-language-server-1.6.1.1 (test:wrapper-test) (configuration changed)
- haskell-language-server-1.6.1.1 (test:func-test) (configuration changed)
Preprocessing library for ghcide-1.6.0.1..
Building library for ghcide-1.6.0.1..
[33 of 76] Compiling Development.IDE.Core.RuleTypes ( src/Development/IDE/Core/RuleTypes.hs, /home/rush/Desktop/oss/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.10.7/ghcide-1.6.0.1/build/Development/IDE/Core/RuleTypes.o, /home/rush/Desktop/oss/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.10.7/ghcide-1.6.0.1/build/Development/IDE/Core/RuleTypes.dyn_o ) [GHC changed]
<command line>: /nix/store/563528481rvhc5kxwipjmg6rqrl95mdx-glibc-2.33-56/lib/libc.so.6: version `GLIBC_2.34' not found (required by /home/rush/.cabal/store/ghc-8.10.7/direct-sqlite-2.3.26-818fd3d15f09228e80772b43db7c405bf637b666eb2b51d62d1a7122c473f6bb/lib/libHSdirect-sqlite-2.3.26-818fd3d15f09228e80772b43db7c405bf637b666eb2b51d62d1a7122c473f6bb-ghc8.10.7.so)
cabal: Failed to build ghcide-1.6.0.1 (which is required by test:wrapper-test
from haskell-language-server-1.6.1.1 and test:func-test from
haskell-language-server-1.6.1.1).
[rush@rush haskell-language-server]$ ldd dist-newstyle/build/x86_64-linux/ghc-8.10.7/haskell-language-server-1.7.0.0/x/haskell-language-server/build/haskell-language-server/haskell-language-server | grep glibc
/bin/sh: /nix/store/yilda176cq33hbv240mqzkf6ks6r9b1p-ncurses-6.2/lib/libncursesw.so.6: no version information available (required by /usr/lib/libreadline.so.8)
ldd: dist-newstyle/build/x86_64-linux/ghc-8.10.7/haskell-language-server-1.7.0.0/x/haskell-language-server/build/haskell-language-server/haskell-language-server: No such file or directory
[rush@rush haskell-language-server]$ ldd --version
/bin/sh: /nix/store/yilda176cq33hbv240mqzkf6ks6r9b1p-ncurses-6.2/lib/libncursesw.so.6: no version information available (required by /usr/lib/libreadline.so.8)
ldd (GNU libc) 2.33
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper. |
Hey, I'm not sure what the issue was, but the codebase builds after I rebased the branch with the new changes, and it builds successfully now on nix as well. Anything else I should test for the PR? P.S. Sorry for the review request spam 😅 |
Does the testsuite pass? |
Yes, all test cases pass Terminal logs
|
Co-authored-by: Pepe Iborra <[email protected]>
NIX_GHC_LIBDIR
in ghcide #1777