-
-
Notifications
You must be signed in to change notification settings - Fork 389
hlint seeking unavailable file /opt/ghc/8.8.4/lib/ghc-8.8.4/settings #591
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 the bug report, it seems the root cause will be the same as #412, so |
Opened issue upstream: alanz/ghc-exactprint#96 |
On MacOS, in vscode, I get:
it looks like some artifact of build process... as vscode plugin uses prebuild binaries. |
I suspect I'm hitting the same issue ("prompt of the progress non stop run" when applying hlint hints), but I can't find the same error in the HLS logs. After setting a log file and enabling tracing in the vscode extension settings, this is what I get:
I'm using v1.2.0 of the extension, with hls 0.6 downloaded by the extension. The project is a minimalist stack project for lts-16.21 (ghc 8.8.4). Should I open a new issue or maybe enable more logging somewhere to confirm this is the same bug? |
@ttylec yeah the hls executable is statically linked and it supposes that if some lib assumes the path to ghc is the compile time one, its calls will fail, making the executable partially non portable @polux the error is present for other users, the unique option for enable logging is |
@jneira is there a way to pass an option to HLS from the vscode settings? I'd like to check that I'm hitting the same bug and not another one. |
@polux yeah, you can enable logging in the extension settings: |
@jneira sorry if I'm being slow, I don't know much about vscode. I had already enabled that option, which was the reason (I think) I was seeing the |
@polux dont worry, you can check the log in: Menu View -> Show output -> Choose Remove the log file setting to see all possible output in that pane. If you dont see |
I do see |
I have a similar issue on NixOS:
I can't really create a symlink in this directory, are there any other workarounds? |
@jul1u5 i am afraid the unique workaround would be building hls from source, if you dont move the ghc used to build it afterwards, it should work. |
I found that by using Nix package with attribute |
@jul1u5 were you using haskell.nix and a nix shell? I'm trying to work out how to fix this, can I add haskell-language-server to my shell.nix and get vscode to use that? |
* remove unnecessary FileExists dependency It is subsumed by the GetModificationTime dependency. One less dependency per .hi file, one less redundant file system access, five fewer lines of code. * Clarify modification time comparisons for .hi and .hie filesAddresses #591 * Fix staleness checking for .hie files (thanks @cocreature)
@shmish111 I haven't tried using haskell.nix. For VS Code to use environment from shell.nix I found this extension works fairly well. |
On my Mac, I got hlint complaining about this file being missing: /Users/runner/.ghcup/ghc/8.10.2/lib/ghc-8.10.2/settings My rather crude workaround was to symlink /Users/runner/.ghcup to my ~/.ghcup |
thanks @jul1u5 looks good |
This was fixed but is happening again to me with the latest version of hls (haskell-language-server-1.0.0-linux-8.10.4):
|
will investigate asap |
@polux had you the opportunity of trying the workaround mentioned above (#591 (comment))? |
@jneira yes the workaround works (but forces me to create a runner directory under home). |
yeah it is very inconvenient, only want to confirm it continues working and you were aware |
Sure, didn't mean to sound dismissive. Thank you for pointing out a workaround! |
no worries it did not sound for me btw maybe there is another workaround with other drawbacks that may work: setting the See haskell-language-server/plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs Lines 410 to 412 in 9f8a172
for the code that "explains" the workaround. If anyone has the opportunity of trying it (and it is more convenient that creating the symlink for you of course) it would help to debug the regression |
It works for me. I haven't played around long enough yet to verify that it doesn't break other functionalities. Note: I had to set the env variable to |
Just wanted to point out that although the tag says OS: Linux, this isn’t specific to Linux. I’m having the problem on macOS with HLS 1.0.0. Was able to apply the symlink workaround. |
yeah, thanks for noting it, we had a similar issue for Windows too, removing the label |
I've opened a pr that should fix the issue (i've tried it locally after reproducing the error): #1451 |
To include the fix for #591 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I've been facing the same issue.
The symlink trick (#591 (comment)) worked: Workaround (assumes ghcup is installed):
Using VSCode Haskell extension, latest version (v1.4.0).
|
@2jacobtan hi! that bug should be fixed for hls 1.1.0.0, so i would suggest to upgrade it |
I've upgraded using Thank you @jneira !! Extra info for other readers: I looked at VSCode output for the Haskell extension, and realised it was indeed using the older HLS version I had installed. Mistakenly assumed the VSCode extension would automatically download and use the latest HLS version. But actually:
https://github.com/haskell/vscode-haskell/tree/a09c9be206782ab8e35ffe973eae273d7f15205d |
Happy to know it is working for you and thanks for the note, it will be useful for future readers |
Subject of the issue
hlint seeking unavailabe file /opt/ghc/8.8.4/lib/ghc-8.8.4/settings
and refactor fail since this error
Your environment
Fedora 33, VSCode 1.51
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
hie.yaml
Steps to reproduce
Expected behaviour
seeking a correct ghc installed
Actual behaviour
seeking /opt/ghc/8.8.4/lib/ghc-8.8.4/settings
Include debug information
N/A
The text was updated successfully, but these errors were encountered: