jyp / dante

392 stars 51 forks source link

support `cabal.project` in parent directories #96

Closed sboosali closed 5 years ago

sboosali commented 5 years ago

"megarepos" (such as servant) are a common pattern for haskell project management, previously only suppported conveniently by stack. with cabal-install-2.0+, project files like this:

packages:
  ./example
  ./example-types

are now becoming ubiquitous. dante currently ignores cabal.project files, which causes issues for most of the packages I develop. my workaround is adding .dir-locals.el in every project I contribute to, like:

((haskell-mode
  . ((dante-project-root . "~/haskell/skeletor/"))))

which decreases its relocatability.

I suggest adding a dante-force-cabal-project option that (dante-project-root) respects.

sboosali commented 5 years ago

something like this:

https://github.com/jyp/dante/compare/master...sboosali:cabal-project

(currently unteseted)

jyp commented 5 years ago

I do believe that this is now fixed in master.