Open ezyang opened 8 years ago
Yes, important. Will review and give my thoughts.
Milestoned for 2.0, because 2.0 is probably the last window when we can make BC-breaking changes to the cabal.project
format. After that will likely be too long.
Pinging @dcoutts for more thoughts on the issue.
There isn't any documentation for
cabal.project
, and it mostly does what people expect, except when it doesn't. So there are two problems: (1) there needs to be documentation saying exactly whatcabal.project
is supposed to do, and (2) the behavior needs to be set to match.Here are the bugs:
--extra-include-dirs
when buildingHsOpenSsl
? (I think the root cause is HsOpenSsl is not inplace, configurations don't apply to it.)packages
it applies even to non-inplace thing?)new-build
apply to local packages, NOT inplace packagesprogram-options
apply to ALL packagesghc-options
needs to be partitioned into "affects hashing" and "doesn't affect hashing" flags.General patterns I'm seeing:
cabal install FLAGS
and having FLAGS apply to all the dependencies which are being built. (#3719, #2997, #3681)new-build
works differently: it NEVER applies the flags to transitive dependencies. This is actually what you want, because if the flags applies to all transitive dependencies, you would end up rebuilding the world every time you specified, e.g., a different--extra-include-dirs
. But it's slightly unintuitive behavior, and worth warning about.packages
) and an inplace package (any package which transitively depends on a local package). For example, in Cabal itself,hackage-security
is NOT a local package, but it is an inplace package (as it depends on Cabal). The semantics for many operations are murky on whether or not they apply to inplace or local.CC @dcoutts