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

improve implicit cradle #422

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

improve implicit cradle #422

wants to merge 2 commits into from

Conversation

wz1000
Copy link
Contributor

@wz1000 wz1000 commented Nov 14, 2023

Improve implicit cradles.

Try to match the behaviour of implicit-hie-cradle as closely as possible.

Elminates the need for implicit-hie-cradle and consolidates cradle selection
logic into hie-bios.

  1. Prefer cabal over stack (all else being equal)
  2. Take work directories into account when making a decision
  3. Use implicit-hie to generate stack multi cradles

In particular, this differs from implicit-hie-cradle in that it uses default
(cradle: cabal:) cradles for cabal.

However, we still generate implicit multi-cradles for stack projects by parsing
the stack.yaml and *.cabal files

1. Prefer cabal over stack
2. Take work directories into account when making a decision

This matches the behaviour of implicit-hie-cradle and should allow us
to eliminate that dependency in HLS.
Now all the logic for generating implicit cradles lives in hie-bios.
@wz1000
Copy link
Contributor Author

wz1000 commented Nov 15, 2023

I've moved this into HLS proper: haskell/haskell-language-server@178e54f

I change change this to deleting implicit cradle stuff from hie-bios.

@michaelpj
Copy link
Contributor

Let's kill it!

@jhrcek
Copy link
Collaborator

jhrcek commented Feb 27, 2024

@fendor If I understand this correctly, the logic from this PR now lives in hls: https://github.com/haskell/haskell-language-server/blob/master/ghcide/session-loader/Development/IDE/Session/Implicit.hs

So can this PR be closed then?

@fendor
Copy link
Collaborator

fendor commented Feb 27, 2024

I think we wanted to remove the implicit cradle logic since we don't need it any more?

@jhrcek
Copy link
Collaborator

jhrcek commented Feb 27, 2024

I can work on that if you give me some pointers, but in any case this PR looks like it's no longer relevant.

@fendor
Copy link
Collaborator

fendor commented Feb 27, 2024

To remove the implicit cradle stuff, just start from https://github.com/haskell/hie-bios/pull/422/files#diff-58ae540d147057c94682a01b61de564caf1eb641fac8d2a3f29ea1f29d673ac4L316 and delete stuff until everything's green again :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants