Previously, the Cabal flags specified at the command line were added and then an action checked the validity of the flags specified for specific packages (only) (in checkFlagsUsedThrowing). Now, the flags are 'checked' as they are added and applyOptsFlag yields a value of type RIO env (Either UnusedFlags CommonPackage).
Moves logic of getLocalFiles from module Stack.Build.Source to Stack.Ghci.loadGhciPkgDescs, as that is the only place where it is now used in the original form.
Moves logic of checkFlagsUsedThrowing from module Stack.SourceMap to Stack.Config.fillProjectWanted, as that is the only place where it is now used in the original form.
To avoid Set.toList . Set.fromList, changes error data constructor to be InvalidFlagSpecification [UnusedFlags].
Note: Fixes for the online documentation of the current Stack release (https://docs.haskellstack.org/en/stable/) should target the 'stable' branch, not the 'master' branch.
Please include the following checklist in your pull request:
[x] Any changes that could be relevant to users have been recorded in ChangeLog.md.
[x] The documentation has been updated, if necessary
Please also shortly describe how you tested your change. Bonus points for added tests! Tested locally on Windows 11.
Previously, the Cabal flags specified at the command line were added and then an action checked the validity of the flags specified for specific packages (only) (in
checkFlagsUsedThrowing
). Now, the flags are 'checked' as they are added andapplyOptsFlag
yields a value of typeRIO env (Either UnusedFlags CommonPackage)
.Moves logic of
getLocalFiles
from moduleStack.Build.Source
toStack.Ghci.loadGhciPkgDescs
, as that is the only place where it is now used in the original form.Moves logic of
checkFlagsUsedThrowing
from moduleStack.SourceMap
toStack.Config.fillProjectWanted
, as that is the only place where it is now used in the original form.To avoid
Set.toList . Set.fromList
, changes error data constructor to beInvalidFlagSpecification [UnusedFlags]
.Note: Fixes for the online documentation of the current Stack release (https://docs.haskellstack.org/en/stable/) should target the 'stable' branch, not the 'master' branch.
Please include the following checklist in your pull request:
Please also shortly describe how you tested your change. Bonus points for added tests! Tested locally on Windows 11.