From dc9a7a0211880644808e0ebb463f85914ff7deaa Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Thu, 23 May 2024 00:29:09 +0100 Subject: [PATCH] Fix #10042 Don't recommend deprecated/removed 'extensions:' field --- .../src/Distribution/PackageDescription/Check/Target.hs | 4 ++-- changelog.d/issue-10042 | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 changelog.d/issue-10042 diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index cc869617795..c40fc0ef09a 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -860,14 +860,14 @@ checkGHCOptions title t opts = do let ghcNoRts = rmRtsOpts opts checkAlternatives title - "extensions" + "default-extensions" [ (flag, prettyShow extension) | flag <- ghcNoRts , Just extension <- [ghcExtension flag] ] checkAlternatives title - "extensions" + "default-extensions" [ (flag, extension) | flag@('-' : 'X' : extension) <- ghcNoRts ] diff --git a/changelog.d/issue-10042 b/changelog.d/issue-10042 new file mode 100644 index 00000000000..e254210c028 --- /dev/null +++ b/changelog.d/issue-10042 @@ -0,0 +1,9 @@ +synopsis: Don't recommend deprecated/removed 'extensions:' field +packages: Cabal +prs: #10044 +issues: #10042 + +description: { + When applicable, field 'default-extensions:' is recommended (rather than + deprecated/removed 'extensions:'). +}