Skip to content

settings: openFile: does not exist (No such file or directory) on hlint applyHint #323

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
erykciepiela opened this issue Nov 12, 2020 · 3 comments
Labels
can-workaround type: bug A bug or unintended effect

Comments

@erykciepiela
Copy link

When testing HLS 0.6.0 hlint application for code:

foo :: p -> p
foo i = id i

I get in the plugin logs:

2020-11-12 10:39:52.865812098 [ThreadId 9836] - applyHint:apply=[("/home/test-project/src/Foo.hs:5:1-12: Warning: Eta reduce\nFound:\n  foo i = id i\nPerhaps:\n  foo = id\n",[Replace {rtype = Decl, pos = SrcSpan {startLine = 5, startCol = 1, endLine = 5, endCol = 13}, subts = [("body",SrcSpan {startLine = 5, startCol = 9, endLine = 5, endCol = 11})], orig = "foo = body"}])]
2020-11-12 10:39:52.867264813 [ThreadId 9839] - finish: hlint (took 0.00s)
/opt/ghc/8.8.3/lib/ghc-8.8.3/settings: openFile: does not exist (No such file or directory)
[Error - 10:39:52 AM] Request workspace/executeCommand failed.
  Message: ExitFailure 1
  Code: -32603 

Hlint didn't get applied, the popup "Applying hint: ..." remains open.

Plugin 1.2.0
GHC 8.8.3
HLS 0.6.0

@jneira
Copy link
Member

jneira commented Nov 12, 2020

Hi, thanks for the bug report. The same issue was opened recently in hls repo: haskell/haskell-language-server#591

There you could track the progress and the possible workarounds:

  • symbolic link ~/.ghcup/ghc to /opt/ghc (replace ~/.ghcup/ghc with the path to your local ghc installation)
  • use a hls version built from source

@lukel97 lukel97 transferred this issue from haskell/vscode-haskell Nov 12, 2020
@jneira
Copy link
Member

jneira commented Nov 12, 2020

@bubba i would prefer to have this in the vscode, to make it visible for other users that will check there their issue

@jneira jneira transferred this issue from haskell/haskell-language-server Nov 12, 2020
@jneira jneira changed the title settings: openFile: does not exist (No such file or directory) on applyHint settings: openFile: does not exist (No such file or directory) on hlint applyHint Nov 12, 2020
@jneira
Copy link
Member

jneira commented Apr 19, 2021

The issue has been resolved in the server (1.1.0)

@jneira jneira closed this as completed Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can-workaround type: bug A bug or unintended effect
Projects
None yet
Development

No branches or pull requests

2 participants