Packages containing C files which include stubs don't work #2056
Labels
build tool: cabal
status: blocked
Not actionable, because blocked by upstream/GHC etc.
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:$ haskell-language-server --probe-tools haskell-language-server version: 1.2.0.0 (GHC: 8.10.4) (PATH: /nix/store/byk240318725g8idscwi89y1cmx4yj5p-haskell-language-server-1.2.0.0/bin/haskell-language-server) Tool versions found on the $PATH cabal: 3.4.0.0 stack: Not found ghc: 8.10.4
Which OS do you use: NixOS
Which lsp-client do you use: emacs
Describe your project (alternative: link to the project): https://git.coop/akshay/gi-gio-hs-list-model
Contents of
hie.yaml
: Nohie.yaml
Steps to reproduce
_stub.h
c-sources
section of the library description in the cabal fileExpected behaviour
Compilation using HLS also works.
Actual behaviour
HLS fails with an error like this:
Workaround
In the repo linked above, I have also have a workaround, which is basically to also add the place where cabal puts the generated stub in the
include-dirs
. This is not a good solution as hackage is currently refusing to accept this cabal file as that path obviously doesn't exist in the repository, even if I have hidden it behind a flag.Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: