Closed chshersh closed 2 years ago
Hi!
For my understanding, you do know that such a hie.yaml would be invalid? Is such a feature still useful in that case?
As another side-info, the simple cabal cradle:
cradle:
cabal:
will work presumably for cabal projects (assuming cabal >= 3.4).
@fendor I didn't know that such a hie.yaml
would be invalid 😮 I haven't found any documentation on this. Maybe you can point me to it if I missed it or maybe documentation can be improved?
At least it such a stack
+cabal
configj worked with my Cabal build but maybe it doesn't work with Stack. Or maybe something different happened.
It's a pity it's not supported. Unfortunately, having only cabal
cradle isn't an option for me. So this issue can be closed if such a hie.yaml
config is indeed invalid.
The only documentation we have is here: https://github.com/haskell/hie-bios
Essentially, the hie.yaml
documents how you load a project into your IDE, it allows you to specify which tool you want to use, cabal or stack, having both does not make sense in its current interpretation. Then the IDE would still not know what you want to use.
Maybe it is some oddity of the yaml parser... But it will only use one of the two.
It is definitely invalid currently.
@fendor Thanks for the confirmation! I was refering to the "config" section of the HLS documentation:
Specifically, when the text says:
"The complete configuration is a subset of
cradle:
cabal:
component: "optional component name"
stack:
component: "optional component name"
bios:
program: "program to run"
dependency-program: "optional program to run"
direct:
arguments: ["list","of","ghc","arguments"]
default:
none:
dependencies:
- someDep
"
So, I assumed that "subset" means any combination of cradles from this example. I haven't found anywhere a mention that only one cradle is supported at the time so I simply assumed it would work.
Then the IDE would still not know what you want to use.
I can imagine that IDE can use the one it finds in PATH. If it finds both, it can use any (doesn't really matter for me). But this is a different logic and probably not worth complicated the IDE setup.
I'm closing this issue since the requested feature is not supported by hie-bios
in the first place.
I'm currently in a situation where a project is developed by a team. Some people use
stack
and otherscabal
. We usegen-hie
as a pre-commit hook, so it would be nice if it can support both--cabal
and--stack
options to generate two cradles at the same time.Taking the example from the README, the output would be something like this: