Related to #1
What is the current consensus to use?
Competing approaches:
loadImplicitCradle from hie-biosIn hls, we didnt take sides, yet, and just use both (which is not a solution), but we need to decide on one of them or some hybrid approach.
Was there some consensus what to use in bristol?
cc @ndmitchell, @cocreature, @alanz, @bubba
I think the consensus in Bristol was to first figure out where exactly loadImplicitCradle is insufficient (@bubba started to look into this). The main issue there is probably multi-cradles.
Personally, I think loadImplicitCradle should do the right thing in the long-term which probably means moving some of the logic for that into build tools (Chris Done implemented a patch for that in Stack at the hackathon).
Until we can rely on that, cabal-helper might be a sensible choice. I don鈥檛 have strong feelings on whether that should be achievedby hie-bios depending on it or in ghcide itself.
I agree with @cocreature that where precisely this functionality lives is not important, but I do think that cabal-helper is probably the best shot we have at it, and we should use it, for the forseeable future.
Imo we could wait to cabal and stack to improve the implicit discovery in hie-bios itself (so not use cabal-helper in it).
If we want to dont link ghcide to cabal-helper (it eventually will get the implicit cradle with the previous change) the unique way i can think of is make ghcide accept external cradles (if it doesnt do it yet) and get the c-h implicit cradle in hls. In fact hls already has the code doing that so that part is already done.
It would suppose that we will not need a new library neither.
I've implement the change here naively, it does not work, of course, and i am afraid that not only for lack of multicradle support: https://github.com/haskell/haskell-language-server/compare/master...jneira:cabal-helper
implicit-hie work for most cases, using For reference: there are some comments related with this #386
We are pushing the implicit-hie use for the implicit cradle: https://github.com/haskell/ghcide/pull/782 without waiting to make it work for common stanzas and conditionals
We already are using implicit-hie-cradle to handle implicit hie-bios config, indirectly with the ghcide bump from #391