-
-
Notifications
You must be signed in to change notification settings - Fork 390
Failed to parse results of calling cabal for preprocessed files in build directory #292
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
I'm not sure if we have support (yet) for preprocessed files, especially the ones generated in dist-newstyle. Can you provide an example project where this occurs anyway? |
Can we ignore such files somehow? |
Yes, you can specify certain files to ignore with a cradle:
multi:
- path: "./src"
config: { cradle: {cabal: {component: "lib:foo"}} }
- path: "./test"
config: { cradle: {cabal: {component: "test:blah"}} }
- path: "dist-newstyle"
config: { cradle: { none: } } |
It didn't work. "Error in $.cradle: Expected an object with path and component keys" |
A configuration that might work could be:
@Abbath You can check a complete hie-yaml configuration syntax here (including a example on how to ignore directories): https://github.com/mpickering/hie-bios#ignoring-directories |
@jneira didn't work either |
@Abbath Would you mind showing some logs? |
hie.yaml: cradle:
multi:
- path: "dist-newstyle"
config: { cradle: { none: } }
- path: "./"
config:
cradle:
cabal:
- path: "./src"
component: "lib:Calculator"
- path: "./src-exe"
component: "exe:Calculator"
- path: "./src-test"
component: "test:Test" logs:
|
Thank you! The cradle root directory seems to be off: Cradle
{ cradleRootDir = "/home/a66ath/Calculator/Calculator"
, cradleOptsProg = CradleAction: Cabal
} and the respective path: Note the discrepancy between: So, my hunch would be that |
@fendor ok, it fixed the
|
I can reproduce the issue. Unfortunately, I currently can not provide an easy fix. |
@fendor I would say push this to ghcide? |
Ok, 0.5.0 seems to work for me. |
I have a problem with haskell-language-server. I use alex+happy and they generate files inside the dist-newstyle directory. Cabal can't repl those files because of the "Unrecognized target" error:
So hls also refuses to work.
My setup:
vscode
ghc-8.8.4
Kubuntu 20.04
The text was updated successfully, but these errors were encountered: