-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide something like --extra-project-file
#7596
Comments
Similar features were also discussed in #7556 (comment) #3738 (comment) edit: i'm not implying this is a duplicate, just referencing stuff |
I think the former could be done in a way that subsumes this, by giving |
include files in cabal.project would be added by #7783 |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Say you have a somewhat involved
cabal.project
, e.g. referencing a number of dependency repositories. And say you want to build this with some different settings (e.g. without optimization for local dev, with some particular GHC settings for CI and production builds. Current ways to do that that I'm aware of:cabal.project.local
, and manipulate those using external tools (e.g., copycabal.project.local.ci
overcabal.project.local
in CI); this is quite error prone (overwrites local user config when testing, ...)cabal.project{,.freeze,.local}
, e.g. by symlinking (fragile depending on OS, lots of files, unobvious)Both approaches also lose the option of using
cabal.project.local
for what it appears to be meant for: local temporary changes. E.g. when debugging CI builds locally, I'd still like to be able to temporarily disable optimization by writing to the "local settings" file.My suggestion (happy for other ways to improve the situation though!):
Add a flag
--extra-project-file
; any arguments to this are merged into the project config the waycabal.project.local
is currently. I.e.,cabal cmd --extra-project-file cabal.project.ci --extra-project-file cabal.project.debug
would merge the config by starting withcabal.project
, then updating the settings in turn (and in that order) bycabal.project.ci
,cabal.project.debug
andcabal.project.local
.The text was updated successfully, but these errors were encountered: