Filter `CommonSetupFlags` more consistently in UnpackedPackage
commitbe4358ca19304ee97ad04f603710a3609b73a20f
authorRebecca Turner <rbt@sent.as>
Fri, 27 Sep 2024 23:53:43 +0000 (27 16:53 -0700)
committerRebecca Turner <rbt@sent.as>
Fri, 27 Sep 2024 23:53:43 +0000 (27 16:53 -0700)
treed969d327e1080ab0345273dab254990c96afb9e2
parentc53a03ae672c7d2d33ad9aa2469c1e38f3a052ce
Filter `CommonSetupFlags` more consistently in UnpackedPackage

In #10292, we will move the `--keep-temp-files` setting into
`CommonSetupFlags` and out of `ReplFlags`/`HaddockFlags`. This means
that the flag-filtering behavior (which adapts flags from new versions
of `cabal-install` to old version of `Cabal`) will need to know which
command is being run to provide the correct `CommonSetupFlags`.

Therefore, this change adds several new `filterFooFlags` functions to
provide this behavior, and removes the `commonFlags` used for all
subcommands in `Distribution.Client.ProjectBuilding.UnpackedPackage`.
cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs
cabal-install/src/Distribution/Client/Setup.hs