Repository navigation
Replace flag-defaulting hack by proper solution - #4886
Conversation
|
Note to self: this may affect #4879 |
|
That CI passes is quite deceptive, as with the PR as it stands, |
|
Can we remove that LANGUAGE ViewPatterns now or is it needed elsewhere? |
|
@fgaz which one? my patch removes already a couple of those... |
|
@hvr I looked at CmdInstall and assumed you leaved it on the other modules too, but apparently I picked the exception, not the rule |
|
@hvr What's the status of this? |
|
@23Skidoo I've just rebased this, and will try to use it locally and try to observe regressions (which I'll report here in this ticket); but generally I think we want to merge this, and fix |
See haskell#4737 This reverts commit 71131cf.
See haskell#4737 This reverts commit 1e90ae4.
| ++ " " | ||
| ++ " Change installation destination\n", | ||
| commandDefaultFlags = (mempty, mempty, mempty, mempty), | ||
| commandDefaultFlags = (commandDefaultFlags configureCommand, |
There was a problem hiding this comment.
nevermind, the commits were in the wrong orde
| commandDescription = Nothing, | ||
| commandUsage = usageFlagsOrPackages "upgrade", | ||
| commandDefaultFlags = (mempty, mempty, mempty, mempty), | ||
| commandDefaultFlags = (commandDefaultFlags configureCommand, |
There was a problem hiding this comment.
nevermind, the commits were in the wrong order
|
After brainstorming w/ @alexbiehl it appears like we want (c.f. #4737) something for the haddock flags in the style of resolveSolverSettings :: ProjectConfig -> SolverSettings
resolveBuildTimeSettings :: Verbosity -> CabalDirLayout -> ProjectConfig -> BuildTimeSettingsspecifically, resolveHaddockSettings :: _ -> ProjectConfig -> HaddockSettings(where EDIT: after some more thought; I'm not so sure about this anymore. It's more tricky |
| isRequested _ ExeKind = fromFlag (haddockExecutables haddockFlags) | ||
| isRequested _ TestKind = fromFlag (haddockTestSuites haddockFlags) | ||
| isRequested _ BenchKind = fromFlag (haddockBenchmarks haddockFlags) | ||
| isRequested _ FLibKind = fromFlagOrDefault False (haddockForeignLibs haddockFlags) |
There was a problem hiding this comment.
in my local version I had a comment along the lines of
-- TODO/HACK, we encode some defaults here as new-haddock's logic;
-- make sure this matches the defaults applied in
-- "Distribution.Client.ProjectPlanning"; this may need more work
-- to be done properly
--
-- See also https://github.com/haskell/cabal/pull/4886which may need to be extended even further to point out that this gives CLI flags unduly importance over per-package cabal.project settings; which is the thing we'd need to do properly in future work.
|
I've merged this as this enables other work to be unblocked (such as #4840) |
This is not finished yet; this is supposed to address issues like #4737 or #5139
/cc @alexbiehl
Regressions:
alltarget)