Skip to content

Accept unknown future GHCs in the argument filtering code #8310

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

Merged
merged 2 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cabal/src/Distribution/Simple/Program/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
= argumentFilters . filter simpleFilters . filterRtsOpts $ ghcArgs
where
supportedGHCVersions :: VersionRange
supportedGHCVersions = intersectVersionRanges
(orLaterVersion (mkVersion [8,0]))
(earlierVersion (mkVersion [9,3]))
supportedGHCVersions = orLaterVersion (mkVersion [8,0])
-- we (weakly) support unknown future GHC versions for the purpose
-- of filtering GHC arguments

from :: Monoid m => [Int] -> m -> m
from version flags
Expand Down
7 changes: 7 additions & 0 deletions changelog.d/pr-8310
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
synopsis: Remove the GHC version upper bound when deciding whether to filter GHC arguments
pr: #8310 #8260
description: {

- Previously, for unknown new versions of GHC, it was not filtering GHC arguments at all, while now it filters them in the same way as for the last known GHC version. This seems a better default and it's one less place to update at release time. Perhaps erroring out or emitting a warning would be safer, but we already emit a general warning elsewhere.

}