haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

Select Project based on the existence of `dist-newstyle`, `dist` and `.stack_work` #1510

Open fendor opened 4 years ago

fendor commented 4 years ago

Instead of just relying on cabal.project, etc ... and installed build-tools, base the decision of build-tool selection on the existence of existing build artifacts. In the case of a tie between cabal and stack, break the tie arbitrarily. Changes are only necessary to https://github.com/haskell/haskell-ide-engine/blob/master/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs

lukel97 commented 4 years ago

I think this is probably the right thing to do, to more accurately guess the user's preferred way of building their project. But just to point out that this might make things more non-deterministic, i.e. build artefacts lying about might sneak up on us

alanz commented 4 years ago

@bubba I understand this to be used only in the absence of a hie.yaml file. And it more closely reflects the old behaviour of hie.