From 3a04b13fadd73d9ca04baf3672eab5a0817ddf17 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 (cherry picked from commit dc9a7a0211880644808e0ebb463f85914ff7deaa) --- .../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 a610b5875a5..531755af992 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -858,14 +858,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:'). +}