You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 what cabal.project is supposed to do, and (2) the behavior needs to be set to match.
There is a distinction between a local package (one which you listed in 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.
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.
Uh oh!
There was an error while loading. Please reload this page.
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. (Specifying flags for all non-local packages in cabal.project #3719, --extra-lib-dirs and --extra-include-dirs ignored? #2997, new-build can't "undo" a build flag and build without the flag #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
The text was updated successfully, but these errors were encountered: