-
-
Notifications
You must be signed in to change notification settings - Fork 398
Add subcradle for Setup.hs #179
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,14 @@ cradle: | |
- path: "./test/testdata/" | ||
config: { cradle: { none: } } | ||
|
||
- path: ./Setup.hs | ||
config: | ||
cradle: | ||
direct: | ||
arguments: | ||
- "-package Cabal" | ||
- "-package base" | ||
Comment on lines
+9
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure this works correctly for stack. Will the correct cradle be shown (e.g. in logs)? Almost definitely not, it will be a multi-cradle from now on, instead of Stack. So this might kill the hls-wrapper, since it decides based on the cradle type the ghc version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mmm, maybe were you thinking in hie instead hls? About stack and cradle, the issue is the direct cradle assumes you have ghc on path and that is not the common case for stack. We could remove the subcradle or add a comment, cause the load of setup will fail anyway, but with a diff error. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I was rather thinking of a work-arounds for experts. You can make it work if you really know what you are doing, but I dont think this works for the average case. E.g. since this will longer be identified as a stack cradle, rather a multi-cradle, hls-wrapper wont do what we expect. We probably need more support for it via hie-bios. |
||
|
||
- path: "./" | ||
config: | ||
cradle: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as for the stack based hie.yaml: not sure if the hls-wrapper trips over it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm, i tested it with the cabal
hie.yaml
and hls-wrapper and hls start fine.Setup.hs
is loaded correctly in the editor. Will test with the stackhie.yaml
...Full log opening `Setup.hs` with vscode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, this case ought to work until haskell/hie-bios#207 is merged. Then an existing cabal.project might redefine the the ghc location.