Skip to content
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

Converge on implicit cradle discovery mechanism #38

Closed
fendor opened this issue Feb 4, 2020 · 7 comments
Closed

Converge on implicit cradle discovery mechanism #38

fendor opened this issue Feb 4, 2020 · 7 comments
Labels
status: in discussion Not actionable, because discussion is still ongoing or there's no decision yet

Comments

@fendor
Copy link
Collaborator

fendor commented Feb 4, 2020

Related to #1

What is the current consensus to use?
Competing approaches:

  • ghcide uses loadImplicitCradle from hie-bios
  • hie uses a custom implicit cradle discovery mechanism powered by cabal-helper

In 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

@cocreature
Copy link
Contributor

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’t have strong feelings on whether that should be achievedby hie-bios depending on it or in ghcide itself.

@alanz
Copy link
Collaborator

alanz commented Feb 4, 2020

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.

@jneira
Copy link
Member

jneira commented Feb 6, 2020

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.

@jneira
Copy link
Member

jneira commented Feb 18, 2020

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: master...jneira:cabal-helper

@jneira
Copy link
Member

jneira commented Jun 15, 2020

@jneira
Copy link
Member

jneira commented Sep 11, 2020

For reference: there are some comments related with this #386
We are pushing the implicit-hie use for the implicit cradle: haskell/ghcide#782 without waiting to make it work for common stanzas and conditionals

@jneira
Copy link
Member

jneira commented Sep 23, 2020

We already are using implicit-hie-cradle to handle implicit hie-bios config, indirectly with the ghcide bump from #391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in discussion Not actionable, because discussion is still ongoing or there's no decision yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants