Open aveltras opened 3 years ago
As fas as I can see, you are using the debug mode of Haskell language server the executable, not hie-bios. The former discovers Haskell source files on its own to try and load them, giving you an overview of which files are available and which one HLS successfully can load.
It should not have any impact on the usual behaviour of HLS, just for this debug mode. IIRC, you can invoke HLS with haskell-language-server backend/
to only look for Haskell files in backend/
.
Or are there other issues as well?
It seems the paths are fully resolved, including symlinks and then they are compared against hie.yaml relative paths. So they dont match and are not processed by the none cradle. A workaround could be add those resolved paths to the hie.yaml:
- path: "/home/romain/.cache/bazel" # or /home/romain/.cache?
config:
cradle:
none:
so maybe the actual ones ("./bazel-out", "./bazel-bin", etc) are not needed
@aveltras did you have the chance to try the above workaround?
@jneira it didn't work. I had to put it on hold for now and will be coming back at this (migration of a monorepo to bazel) soon hopefully. Feel free to close this issue, I'll comment again if I find anything.
Hi,
I'm currently trying to get haskell language server working with bazel and Nix. Here is the repo for reference: https://github.com/aveltras/haskell-bazel-nix
I'm wondering if it's possible to prevent some directories from being processed, see the following for the why.
Here is the layout of my project.
The important directory here is backend which is the only one containing haskell code.
Here is the content of hie.yaml
Here is the content of .hie-bios
Here is the result of running
cat bazel-bin/hie-bios@hie-bios
which get put into $HIE_BIOS_OUTPUT:When I run
haskell-language-server
in the repo for the first time I get no problem as seen below.Having been run a first, bazel adds symlinks in the current repository as seen below:
When running
haskell-language-server
a second time, I know get errors related to haskell files present in my home directory.