haskell / haskell-ide-engine

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

Multiple stack.yaml files #1799

Closed ahri closed 4 years ago

ahri commented 4 years ago

I have 2 separate (but related) projects with different stack.yaml files defining different LTS versions for different GHC versions. I can't see an obvious way to tell HIE about this via the hie.yaml, i.e. I can't say the path ./client is a stack cradle, but please execute with ./client/stack.yaml as the root.

From another perspective, I can run both of these commands and they work, but I don't know how to write a hie.yaml that captures this:

$ stack repl project:exe:server
$ stack --stack-yaml client/stack.yaml repl project-js:exe:client

Should I restructure my project to have multiple hie.yaml files? Would they have to be in parallel (rather than nested) directories? Am I simply missing something obvious? :)

jneira commented 4 years ago

There is just a pr in hie-bios (the library that interprets hie.yaml config) to let inform several stack.yaml in the same config file: https://github.com/mpickering/hie-bios/pull/230 That said, this project is not being maintained and maybe the hie-bios version with the feature will not be included. I would try the succesor of this project: https://github.com/haskell/haskell-language-server

ahri commented 4 years ago

Ok, I'll cross-post there! Thank you for letting me know!