-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Failing to use haskell-language-server on itself #121
Comments
If I recall run stack build, and try again |
Thank you for your bug report! EDIT: misclicked, didnt intend to close |
I tried
|
Is it working when you open files in vscode? |
You are right! This seems to work now in VS Code: at least I have hover types and GHC warnings correctly displayed. I propose we use this issue to add in the README that one must run |
We should probably should just invoke stack build in a side process with progress indicators, at the start if we see that error. I don't believe cabal has that issue. The same error happens on other repos besides hls if you don't run stack build first. A PR containing either a note in the readme about that error, or detecting the error and invoking stack build automatically is welcome. |
Accidental closing too 😅 I think the surprising/weird bit is that I am unsure if this is feasible, but I think the ideal would be for this command to take care of building |
It would be useful to change @jneira is this possible? |
Didn't read the issue entirely but these pieces look awfully lot like #114 |
@Anrock When stack fails it always looks similar, but I have seen it on other more basic repos and |
Sorry, I was probably thinking of commercialhaskell/stack#4148, which had a workaround of |
@Anrock That does look like the cause. |
Hi, well,
So whatever would do |
Indeed, i have a hypothesis: hls picks Or replace the |
But that's exactly what I did in my first post, right? I did |
Oh, sorry i missed that one, so maybe Otoh if stack is messing with the private lib here too we could replace it with common stanzas in .cabal and fix both issues |
I just did some tests and the content of $ stack build
$ find .stack-work -type f -print0 | xargs -0 md5sum >> ~/sandbox/without-copy.txt
$ rm -rf .stack-work
$ stack build --copy-bins
$ find .stack-work -type f -print0 | xargs -0 md5sum >> ~/sandbox/with-copy.txt
$ diff ~/sandbox/without-copy.txt ~/sandbox/with-copy.txt
# empty line There is no difference: there are exactly the same files and they have the same checksum. However there is a HUGE diff if I compare I think it revolves to either of these:
Related: Thank you for the help 🙏 By the way, could someone reproduce my issue? To ensure it's a real problem, and not just mine 😄 |
I am trying to reproduce and while i was doing it i checked the script code that installs hls: haskell-language-server/install/src/Stack.hs Lines 21 to 29 in 6dc7894
In fact |
Unfortunately i cant build hls for 8.6.5 in my windows machine due to #90, so i have to fix that before reproducing this one 😄 |
Hi, i've got to install hls with
I guess the lack of final error message would be one of the advantages of work in windows. 😝 So it seems I dont think add But another one could be remove the private lib, given it causes issues in both cabal and stack and remove it with a common stanza to avoid duplicate the modules in several components. |
But shouldn't the global With your solution, I need to open 2 editors, 1 for the main code and 1 for the |
Install is not a component of hls. |
I agree regarding building/packaging (hence not being present as a Stack or Cabal module), however hie-bios is also about how the project should be understood by tools. And the install folder also contains Haskell code so it would make sense to also support this. The hie.yaml could be a multi type with stack/cabal for other modules and another one for the install folder... |
Yeah, @Avi-D-coder way is the more straightforward one. The install program doesn't belong to main hls project on purpose and |
Hi, I tried to use HLS (of the latest commit) on
Is this related with this issue, or better to be a separate issue? |
@Ailrun no, sorry, that is a general issue with stack and the use of the autogenerated |
@sir4ur0n i think the main issue (private lib) has been avoided, do you think we could close this one and open other more specific issues, if needed? |
@jneira Then should I file an issue on the stack repo? You meant it's a problem of stack, right? |
@Ailrun not totally sure, although stack handling could be the origin of the issue, it seems it does no cause any direct problem in stack itself, so the fix would be specifically for our use case. I think before filling an issue it will be great try to find an actual problem in stack itself caused by that. |
I just tested again and the problem seems to persist 🤔 I started again from a fresh clone as stated in my OP. First runErrors
Full logs
Second runErrors
Full logs
|
Note: It seems to work in an IDE (VS Code) outside of the |
in the hie.yaml (i would add it to the
|
As for the fdLock invalid argument, this seems to be tied to WSL 1 + Cabal, as per haskell/cabal#6551 I guess we can ignore it, as WSL 2 is to be released soon? |
FYI I'm testing a multi-cradle syntax in I think we should reopen this issue (I can't) |
Besides the PR I just opened, I still need to run So there is another issue to fix. Once I run Note, I still get 3 errors in 2
|
This one is related with haskell/haskell-ide-engine#1564 and tracked upstream in commercialhaskell/stack#5213. It even has an ongoing pr If you want to open test modules you could do a Many thanks to create pr's and specific issues to tacke this. |
Hi @jneira , I just pushed a second commit to #147 + added comments explaining the content. I think it solves the last bits of this issue. As you will see, I added documentation in the README to explain the current shortcomings (like running Hope we're getting close! 😄 Thanks for your help and patience |
Hi,
I searched in the previous issues but couldn't find any related issue.
I do not manage to use haskell-language-server on itself 🤔 Basically I wanted to start hacking/looking at the code, and noticed in VSCode that all hovers get stuck on "Loading...".
Steps to reproduce:
git clone https://github.com/haskell/haskell-language-server --recurse-submodules
cd haskell-language-server
stack ./install.hs hls-8.6.5
(8.6.5
becausestack.yaml
useslts-14.27
which relies on GHC 8.6.5)cp hie.yaml.stack hie.yaml
haskell-language-server
I get 3 errors and
haskell-language-server: <command line>: cannot satisfy -package z-haskell-language-server-z-hls-test-utils
.In VSCode, surprisingly, I don't get the 3 compiler errors, only the last
haskell-language-server: <command line>: cannot satisfy -package z-haskell-language-server-z-hls-test-utils
bit 🤔 Maybe this is related to the fact that VS Code runs it in LSP mode though.Below the full logs (second run, the first is the same but with a lot of
using precompiled language
):For what it's worth:
sudo apt install libicu-dev libtinfo-dev libgmp-dev
The text was updated successfully, but these errors were encountered: