haskell / hie-bios

Set up a GHC API session for various Haskell Projects
https://hackage.haskell.org/package/hie-bios
BSD 3-Clause "New" or "Revised" License
181 stars 63 forks source link

DRAFT: allow specifying --stack-work #374

Closed dten closed 2 years ago

dten commented 2 years ago

resolves #345

annoyingly even though this is entirely optional it's a breaking change for implicit-hie-cradle because it uses the sole pattern https://github.com/Avi-D-coder/implicit-hie-cradle/blob/master/src/Hie/Implicit/Cradle.hs#L75

dten commented 2 years ago

right now it seems to be missing something.. any guess?

fendor commented 2 years ago

Hello, thank you for your contribution!

I agree that it needs to be specifiable to change the work-dir, I am just wondering right now, whether it would be better to have something more generic. I am thinking about allowing to specify environment variables, then you could have

cradle:
  stack:
environment:
  - STACK_WORK=.stack-work-directory

What do you think about that?

dten commented 2 years ago

That sounds pretty compelling. I'll have another look

dten commented 2 years ago

your amazing suggestion has kind of shown me that both changes feel a bit redundant right now. I found that the the code plugin and sublime plugins both allow specifying environments variables to add to the env of hls when running.

so for any additional stack arguments which can be passed via env this functionality is already easily usable and lets you use the implicit cradle.

dten commented 2 years ago

i'll close this for now, but if you think the environment option is still useful to anyway i might pick that up again