Skip to content

haskell-language-server 0.1 stops before checking files #84

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

Closed
Philonous opened this issue May 4, 2020 · 5 comments · Fixed by #95
Closed

haskell-language-server 0.1 stops before checking files #84

Philonous opened this issue May 4, 2020 · 5 comments · Fixed by #95
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@Philonous
Copy link

Running haskell-language-server (or the included ghcide binary) just stops before checking any source files.
e.g. within the haskell-language-server directory:

> ln -s hie.yaml.stack hie.yaml
> haskell-language-server                                                                                                                                      
ghcide version: 0.1.0.0 (GHC: 8.6.5) (PATH: /home/phil/.local/bin/haskell-language-server) (GIT hash: 019b02831595b6a3be6776bfc56060ab918876e7)
(haskell-language-server)Ghcide setup tester in /home/phil/projects/hackage/haskell-language-server.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/6: Finding files to test in /home/phil/projects/hackage/haskell-language-server
Found 97 files

Step 2/6: Looking for hie.yaml files that control setup
Found 2 cradles

Step 3/6: Initializing the IDE

Step 4/6: Type checking the files

The same happens when I run ghcide:

> ghcide                                                                                                                                                       ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: /home/phil/.local/bin/ghcide) (GIT hash: )                                                                                                                                                           
Ghcide setup tester in /home/phil/projects/hackage/haskell-language-server.                                                                                                                                                                    
Report bugs at https://github.com/digital-asset/ghcide/issues                                                                                                                                                                                  
                                                                                                                                                                                                                                               
Step 1/6: Finding files to test in /home/phil/projects/hackage/haskell-language-server                                                                                                                                                         
Found 97 files                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                               
Step 2/6: Looking for hie.yaml files that control setup                                                                                                                                                                                        
Found 2 cradles

Step 3/6: Initializing the IDE
[DEBUG] Warning: Client does not support watched files. Falling back to OS polling

Step 4/6: Type checking the files
[DEBUG] Set files of interest to: [NormalizedFilePath "/home/phil/projects/hackage/haskell-language-server/ghcide/src/Development/IDE/Core/FileStore.hs"
<...snip...>

This is on NixOs, but I installed haskell-lanaguage-server just by stack install without any configuration changes.

@Philonous
Copy link
Author

Should maybe add that both return with exit code 0.

@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. status: needs repro os: nixos labels May 6, 2020
@georgefst
Copy link
Collaborator

I've got exactly the same symptoms. ghc-8.8.3 on Ubuntu 16.04.

This is the first time I've tried to use hls, and I get the same response from every project I've tried running it on.

Willing to provide more details, but I'm not sure what's relevant.

@fendor
Copy link
Collaborator

fendor commented May 6, 2020

@Philonous You have problems with just executing the executable, right?

@georgefst You want to use it as a lsp server? You need to pass the --lsp flag to the executable to start it as a lsp-server.

@Philonous
Copy link
Author

That's correct. I'm executing the haskell-language-server and ghcide binaries in the root of the project without any additional arguments. (I'm not trying to run them as language servers)

@jneira
Copy link
Member

jneira commented May 6, 2020

Can reproduce, i think the code to actually typecheck the files is commented out:

-- _ <- runActionSync "TypecheckTest" ide $ uses TypeCheck (map toNormalizedFilePath' files)
-- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath' "src/Development/IDE/Core/Rules.hs"
-- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath' "exe/Main.hs"

@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. and removed os: nixos type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. status: needs repro labels May 6, 2020
@jneira jneira closed this as completed in #95 May 7, 2020
pepeiborra pushed a commit that referenced this issue Dec 27, 2020
* Improve and extend feature list

* Fix typo in feature table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants