-
Notifications
You must be signed in to change notification settings - Fork 698
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
cli defaults override new-build cabal.project settings #4737
Comments
After some more investigation, I think that defaults are supposed to be applied in resolveSolverSettings :: ProjectConfig -> SolverSettings
resolveBuildTimeSettings :: Verbosity -> CabalDirLayout -> ProjectConfig -> BuildTimeSettings PS: I'm currently testing |
Is this by any chance related to the issue I'm having here (with Cabal c480f69):
(I really don't see why I should need to define those flags at all, as they're enabled by default. I don't recall ever needing to specify flags in old builds. But now the “flags were not |
@leftaroundabout what you're experience appears to be a totally different issue, which looks serious enough to deserve its own issue being filed... |
Thanks, I did that. |
@dcoutts confirmed that I'm on the right track regarding #4737 (comment) ...so we need to basically revert 1e90ae4 (#4422) & #4657 and instead start fixing/finishing the See also comments at cabal/cabal-install/Distribution/Client/ProjectConfig/Types.hs Lines 339 to 349 in 22d8e32
|
See haskell#4737 This reverts commit 71131cf.
See haskell#4737 This reverts commit 1e90ae4.
See haskell#4737 This reverts commit 71131cf.
See haskell#4737 This reverts commit 1e90ae4.
See haskell#4737 This reverts commit 71131cf.
See haskell#4737 This reverts commit 1e90ae4.
I haven't checked the code but from comments above it looks like this was fixed. |
It appears the fix in #4657 wasn't enough.
I was looking into why setting
in a
cabal.project
file would have no effect, and it turns out it's because inrebuildProjectConfig
the cli-flags have highest priority, due tohowever, in #4657 we deliberately injected
applyDefaults
so thecliConfig
constructed viacliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags installFlags haddockFlags
already has those defaults.
And here's a dumped version of what
cliConfig
looks like for a simple invocation ofcabal new-build
w/o any CLI arguments:As can be seen, all flags which have a definitive
Flag ...
constructor will effectively overridecabal.project
settings, and specificallywas the setting I was looking for...
and it appears to me, that the default injection should instead happen in
rebuildProjectConfig
(which is called byestablishProjectBaseContext
)/cc @alexbiehl @23Skidoo
The text was updated successfully, but these errors were encountered: