haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.72k stars 368 forks source link

Show "Add dependency" Code Action only if there is no `package.yaml` file #4400

Closed fendor closed 1 month ago

fendor commented 2 months ago

If the project is a stack project, there might be a package.yaml file. Adding a dependency to the generated .cabal file is a bad idea, as it will lead to annoying behaviour: Stack will no longer re-generate the .cabal file, so changes to package.yaml are not propagated to the .cabal file any more.

solution:

When looking for the .cabal file in the filesystem, check there is no package.yaml file next to it.

ASnd-dev commented 1 month ago

We (@JMoss-dev and I) are working on this issue.

fendor commented 1 month ago

Closed by #4422