-
-
Notifications
You must be signed in to change notification settings - Fork 387
HLS 1.5 requires hie.yaml
else it would fail to run, but works in HLS 1.2
#2398
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
Comments
thanks for reporting the issue
hie.yaml should not be necessary so it is a bug probably related with the hie-bios library //cc @fendor |
How do I check for this? |
hmm |
Ah got it. [sekun@nixos:~/Projects/foo]$ ls -la
total 76
drwxr-xr-x 7 sekun users 4096 Nov 25 15:12 .
drwxr-xr-x 7 sekun users 4096 Nov 25 11:39 ..
-rw-r--r-- 1 sekun users 115 Nov 25 11:58 CHANGELOG.md
drwxr-xr-x 3 sekun users 4096 Nov 25 15:12 .direnv
drwxr-xr-x 6 sekun users 4096 Nov 25 12:01 dist-newstyle
-rw-r--r-- 1 sekun users 10 Nov 25 15:12 .envrc
-rw-r--r-- 1 sekun users 992 Nov 25 15:01 flake.lock
-rw-r--r-- 1 sekun users 696 Nov 25 15:11 flake.nix
drwxr-xr-x 8 sekun users 4096 Nov 25 15:11 .git
-rw-r--r-- 1 sekun users 293 Nov 25 11:48 .gitignore
-rw-r--r-- 1 sekun users 146 Nov 25 15:12 hie.yaml
-rw-r--r-- 1 sekun users 1514 Nov 25 11:26 LICENSE
drwxr-xr-x 2 sekun users 4096 Nov 25 14:29 src
-rw-r--r-- 1 sekun users 13903 Nov 25 14:19 .stylish-haskell.yaml
-rw-r--r-- 1 sekun users 1124 Nov 25 14:48 foo.cabal
drwxr-xr-x 2 sekun users 4096 Nov 25 11:58 test [sekun@nixos:~/Projects/foo]$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/disk/by-uuid/c950348d-10f4-421f-a595-486f064fc3f1 471571688 35942640 411601096 9% / |
Could you test with 1.4, to find out in which version things regressed? |
How did you install HLS? This error looks suspiciously like a bug from I just checked that nixpkgs nightly contains the offending version (0.4.0.1). So maybe HLS has been built by nix with |
@pepeiborra Sure, hopefully I'll be able look into it tomorrow if ever needed.
Through nix
Ah I think that's it! I just checked it for the specific commit if nixpkgs I'm using; matches the version you mentioned. Is this resolved in 0.4.0.2? |
I hope so, but I don't think implicit-hie has any tests. The relevant PR is: #2342 |
Hi, I've just checked it (I think so...). In my case Here is my nix overlay: kczulko/nixos-config@24e4180 And this is what I get: HLS output (part of it)
Thanks, |
Like @sekunho I have the same issue. Here are some further details:
I am not using Nix. I’m new to all this therefore I don’t really know how to debug this (also I can’t run the This doesn’t impose too much of an inconvenience so I think I’ll make use of the compiler directly for now. Hopefully this gets sorted out soon! And yes, thank you all for your work on the HLS! |
I have published |
Hi @Avi-D-coder I'll try to check it and let you know what's the result. Thank you very much! Best regards, |
Hi, Maybe I'm doing sth wrong but updating to Here's my code: kczulko/nixos-config@8b23423 Best regards, |
Does 0.3.0.5 still work? |
Nope, still the same error: I have also tried nix-build directly from the hls source code at this point:
and ofc I get |
I'll try and reproduce it. |
Oh. I have just spotted how it works... so |
If this helps anyone, that's my workaround for now. I'm building latest (1.5.1.0) hls from sources: # hls 1.5.1.0
haskell-language-server = (import (
fetchTarball https://github.com/haskell/haskell-language-server/archive/745ef26f406dbdd5e4a538585f8519af9f1ccb09.tar.gz
)).defaultPackage.x86_64-linux; Regards, |
I reproduce the |
I hope distribution channels will be updated sooner or later with the fixed implicit-hie vuersion, so closing, thanks for reporting the issue! |
needed to work around haskell/haskell-language-server#2398
Since upgrading to nixos-21.11 as the channel, LSP refused to work unless I gave it an hie file: > haskell-language-server-wrapper --project-ghc-version No 'hie.yaml' found. Try to discover the project type! Some clues in some tickets like: * haskell/haskell-language-server#2398 * haskell/haskell-language-server#1972 But in the end I just added implicit-hie to shell.nix to be able to run `gen-hie` and then things worked: > haskell-language-server-wrapper --project-ghc-version Found "/home/luis/code/lfborjas/haskell-curriculum/hie.yaml" for "/home/luis/code/lfborjas/haskell-curriculum/a" 8.10.7 not sure what that `a` is all about tho.
Hello, thanks again for all the work put into HLS!
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 1.5.0.0 (GHC: 8.10.7) (PATH: /nix/store/ngi32ilj18ppcc78g0kc3z3zq4r3s049-haskell-language-server-1.5.0.0/bin/haskell-language-server) Tool versions found on the $PATH cabal: 3.6.2.0 stack: Not found ghc: 8.10.7
Which OS do you use:
NixOS 21.05
Which lsp-client do you use:
doom emacs
v21.12.0-alpha
with haskell modeDescribe your project (alternative: link to the project):
It's a newly generated project with
cabal init --interactive
with nix flakes to provide the HLS, cabal, and GHC. https://gist.github.com/sekunho/72747c20a192e62a6fc9dc9e9660aa0aContents of
hie.yaml
:N/A
Steps to reproduce
nix develop
(ordirenv
)haskell-language-server --debug
However, it works if I do:
gen-hie > hie.yaml
haskell-language-server
It's strange because when I pin a commit of
nixpkgs
to one that contains HLS 1.2.0.0 and ghc 8.10.6, it works. It doesn't work with HLS 1.5.0.0 and GHC 8.10.7. How come 1.5 requireshie.yaml
while 1.2 doesn't?Expected behaviour
Shouldn't complain about a bad file descriptor without
hie.yaml
since it works for 1.2.Actual behaviour
Complains about a bad file descriptor without it.
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: