Skip to content

Unable to get code completion or other lsp features - stuck type checking the files #1624

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
F15Ky opened this issue Mar 26, 2021 · 6 comments
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@F15Ky
Copy link

F15Ky commented Mar 26, 2021

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4

Which lsp-client do you use:
Doom Emacs
Describe your project (alternative: link to the project):
Contents of cabal file:

cabal-version:       >=1.10
name:                Everything-Manager
version:             0.1.0.0
synopsis:            System used to optimize the efficiency of achieving goals.
bug-reports:         https://github.com/fairy-tale-agi-solutions/Everything-Manager/issues
license:             MIT
license-file:        LICENSE
author:              Răzvan Flavius Panda
maintainer:          razvan.panda@gmail.com
category:            Productivity
build-type:          Simple
extra-source-files:  CHANGELOG.md, README.md

executable Everything-Manager
  main-is:             Main.hs
  -- other-modules:       Lib.EverythingManager
  build-depends:       base,
                       containers,
                       generic-lens,
                       lens,
                       text,
                       hedgehog,
                       postgresql-simple,
                       product-profunctors,
                       opaleye,
                       miso,
                       turtle
  default-language:    Haskell2010
  default-extensions:  DataKinds,
                       DeriveGeneric,
                       DuplicateRecordFields,
                       FlexibleContexts,
                       OverloadedStrings,
                       TypeApplications,
                       Arrows,
                       RecordWildCards

library Everything-Manager-Library
  -- other-modules:       Lib.EverythingManager
  build-depends:       base,
                       containers,
                       generic-lens,
                       lens,
                       text,
                       hedgehog,
                       postgresql-simple,
                       product-profunctors,
                       opaleye,
                       miso,
                       turtle

  default-language:    Haskell2010
  default-extensions:  DataKinds,
                       DeriveGeneric,
                       DuplicateRecordFields,
                       FlexibleContexts,
                                            

Steps to reproduce

After setting up haskell language server and lsp-haskell for emacs, I still get no completion.

Expected behaviour

I expect code completion as well as other lsp features.

Actual behaviour

No code completion is given.

Include debug information

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output: haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /home/ben/.local/bin/haskell-language-server) (GIT hash: 8dbeae1) ghcide setup tester in /home/ben/Documents/haskell/Everything-Manager. Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/ben/Documents/haskell/Everything-Manager
Found 6 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
()

Step 3/4: Initializing the IDE

Step 4/4: Type checking the files
2021-03-26 17:52:59.383441561 [ThreadId 4] DEBUG hls: Set files of interest to: [(NormalizedFilePath "/home/ben/Documents/haskell/Everything-Manager/Setup.hs",OnDisk),(NormalizedFilePath "/home/ben/Documents/haskell/Everything-Manager/Lib/EverythingManager.hs",OnDisk),(NormalizedFilePath "/home/ben/Documents/haskell/Everything-Manager/install.hs",OnDisk),(NormalizedFilePath "/home/ben/Documents/haskell/Everything-Manager/test/TestEverythingManager.hs",OnDisk),(NormalizedFilePath "/home/ben/Documents/haskell/Everything-Manager/Main.hs",OnDisk),(NormalizedFilePath "/home/ben/Documents/haskell/Everything-Manager/Lib/Connection.hs",OnDisk)]

<paste your logs here>

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs: https://gist.github.com/F15Ky/69e242397f60575147460afe9262c7f8
<paste your logs here>
@jneira jneira added the type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. label Mar 26, 2021
@F15Ky
Copy link
Author

F15Ky commented Mar 29, 2021

This is what I get when running haskell-language-server in the projects top directory:

haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /home/ben/.local/bin/haskell-language-server) (GIT hash: 8dbeae160c526672958096edee48aa97ef9f5359)
ghcide setup tester in /home/ben/Documents/haskell/hlstest.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/ben/Documents/haskell/hlstest
Found 1 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  ()

Step 3/4: Initializing the IDE

Step 4/4: Type checking the files

When I run it on a different system the output continues past that.

@F15Ky F15Ky changed the title Unable to get code completion or other lsp features Unable to get code completion or other lsp features - stuck type checking the files Mar 29, 2021
@jneira
Copy link
Member

jneira commented Mar 29, 2021

Hi, thanks for the bug report, the output is strange, the process find one file to process in the test but it does not get typechecked.
The process get stuck in the 4th step or it exits without no further output?
Also, have you tried your editor with other lsp-server or hls with other editor?

@F15Ky
Copy link
Author

F15Ky commented Mar 30, 2021

The process get stuck on the 4th step with no more output.

ghcide gives the same output as haskell language server.

I do not get code completion after installing language-haskell and atom-ide-ui on Atom.

@F15Ky
Copy link
Author

F15Ky commented Mar 31, 2021

I was running this inside VirtualBox, and after doing some elimination, I found that switching from 1 processor to 4 solved the issue on my end. Thanks for the help.

@michaelpj
Copy link
Collaborator

Ah, perhaps #727. Can we check the number of capabilities and give an error if it's 1?

@jneira
Copy link
Member

jneira commented Apr 1, 2021

Ok i am gonna close it as duplicate of #727, i've copied the comment with the last suggestion there

@jneira jneira closed this as completed Apr 1, 2021
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

No branches or pull requests

3 participants