hie-bios icon indicating copy to clipboard operation
hie-bios copied to clipboard

improve implicit cradle

Open wz1000 opened this issue 2 years ago • 6 comments

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

wz1000 avatar Nov 14 '23 13:11 wz1000

I've moved this into HLS proper: https://github.com/haskell/haskell-language-server/pull/3462/commits/178e54f8b2367ca47619081677d127fd3fa94c61

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

wz1000 avatar Nov 15 '23 08:11 wz1000

Let's kill it!

michaelpj avatar Dec 19 '23 11:12 michaelpj

@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?

jhrcek avatar Feb 27 '24 08:02 jhrcek

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

fendor avatar Feb 27 '24 08:02 fendor

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

jhrcek avatar Feb 27 '24 08:02 jhrcek

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

fendor avatar Feb 27 '24 09:02 fendor