-
-
Notifications
You must be signed in to change notification settings - Fork 389
No such file or directory in .cache/hie-bios #1561
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
Hi! Thank you for the bug report! |
Hi! Thanks for the fast response. I never explicitly installed hie-bios, I just installed the vscode plugin. It doesn't seem to be in path so it's hard to check which version it is. |
Can not reproduce on recent Haskell Language Server build. Can you go to the main menu and choose Instructions taken from https://github.com/haskell/vscode-haskell#investigating-and-reporting-problems |
There we go |
So at least two funky things happen here:
No idea how this happens. Maybe somehow related to docker? And the other thing:
Which points to basically this line: https://github.com/mpickering/hie-bios/blob/master/wrappers/cabal#L4 I would be interested (unfortunately, no idea whether really relevant), do you happen to know whether stack repl --package temporary
> import System.IO.Temporary
> withSystemTempFile "test" (\fp _ -> print fp) and then check whether the parent directory of the produced fp really exist? E.g. when the output is |
I just tried it, so I ran
And yeah I don't find /tmp/test9-0. |
That's fine, the temporary file is removed after printing, so works as intended. Unfortunately, I dont have an idea right away now. |
Sure, minimal example here https://github.com/MarcCoquand/someExample Stack version is Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0 |
Can reproduce in this setting. I can imagine that this is some docker issue |
Hmm ok, Should this issue be raised in Haskell Stack then or is it a problem with haskell-language-server? |
I think here is fine, until we found the issue. Maybe this is just a matter of mounting Debugging the development container somehow would definitely be helpful. |
Hmm, the development container is just the default one from here https://hub.docker.com/r/fpco/stack-build/ But I could try a custom build and mount EDIT:
But I'm still getting |
Hi all! I'm affected too. Confirming that this happens in stack-docker projects only; @fendor correction here:
— not quite; notice the empty filename in the error message from bash,
So as you can see, it's not about |
Indeed, interesting. Maybe stack docker container clears the environment variables? |
Oh it does, absolutely. Unless something akin to the standard |
This seems relevant: https://docs.haskellstack.org/en/stable/docker_integration/#configuration |
It should be possible to define a custom value for E.g., adding to env:
- "HIE_BIOS_OUTPUT=some-file" could work. However, note that using the |
Yep, that does seem to help! 👍 So, a workaround is to define
But I presume, the expectation is that Stack does that itself... |
Yep, that is the workaround. It should be some file that we can write and read. Maybe we can tell stack to pass this environment variable, given by |
That should be possible, though I'm not proficient in Stack inner workings, so hard to tell how exactly to do that. A caveat came to mind:
It seems that
... And right away I prove my worry wrong, here're mounts of a live
— these include The crux of the bug seems to get Cannot yet confirm if |
Having the same issue:
No Docker!
Workaround
|
No docker is actually weird, might be a hie-bios regression, as it should create the directory if it does not exist. |
could we confirm if it is a hie-bios regression @fendor? |
the docker issue might be related with #430 |
don't think it is a regression per se, but rather a docker/stack issue. It probably never worked |
oh but it seems it was reproduced without docker here: #1561 (comment) and your response was
|
According to this: https://github.com/haskell/hie-bios/blob/master/src/HIE/Bios/Cradle.hs#L492 we should always create the directory... So I am not sure whether we fixed it... |
Still experiencing this. Has this been fixed? |
@oskarpyke What HLS version are you using, and how did you install it? |
Closing as old and no recent reports |
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:zsh: command not found: haskell-language-server-wrapper
Which lsp-client do you use:
VS Code
Describe your project (alternative: link to the project):
stack.yaml has a special resolver and some extra deps
resolver: lts-13.22
extra-deps:
docker:
enable: true
Contents of
hie.yaml
:Steps to reproduce
I installed vs code with the haskell-language-server plugin, it worked fine until I enabled docker and a lower version of the resolver, which I had to do to in order to get Haskell serverless working.
After changing the resolver, haskell-language-server complained that the compiled version it used was different from the project. To fix that I removed haskell-platform from my ubuntu setup in an attempt to make it use the stack version.
Expected behaviour
I expected it to compile and work
Actual behaviour
I get the following error on top of the project
Using main module: 1. Package `myproject' component myproject:exe:bootstrap with main-is file: /home/me/Projects/MyprojectFolder/myproject/app/Main.hs
myproject> configure (lib + exe)
Configuring myProject-0.1.0.0...
myproject> initial-build-steps (lib + exe)
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
Configuring GHCi with the following packages: myProject
/home/me/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b: line 4: : No such file or directory
/home/me/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b: line 4: : No such file or directory
/home/me/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b: line 4: : No such file or directory
...
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:zsh: command not found: haskell-language-server
The text was updated successfully, but these errors were encountered: