Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module Distribution.Client.ProjectConfig.FieldGrammar
import Data.Bool (bool)
import qualified Data.ByteString.Char8 as BS
import qualified Data.Set as Set
import Distribution.CabalSpecVersion (CabalSpecVersion (..))
import Distribution.Client.CmdInstall.ClientInstallFlags (clientInstallFlagsGrammar)
import qualified Distribution.Client.ProjectConfig.Lens as L
import Distribution.Client.ProjectConfig.Types (PackageConfig (..), ProjectConfig (..), ProjectConfigBuildOnly (..), ProjectConfigProvenance (..), ProjectConfigShared (..))
Expand Down Expand Up @@ -199,11 +198,9 @@ packageConfigCoverageGrammar =
(<>)
<$> optionalFieldDef "coverage" L.packageConfigCoverage mempty
<*> optionalFieldDef "library-coverage" L.packageConfigCoverage mempty
^^^ deprecatedSince CabalSpecV1_22 "Please use 'coverage' field instead."

packageConfigPreferVersion :: ParsecFieldGrammar ProjectConfigShared (Flag PreferVersion)
packageConfigPreferVersion =
mappend . fmap (bool PreferInstalledOrLatest PreferOldest)
<$> optionalFieldDef "prefer-oldest" L.projectConfigPreferOldest mempty
^^^ deprecatedSince CabalSpecV3_20 "Please use 'prefer-version' field instead."
<*> optionalFieldDef "prefer-version" L.projectConfigPreferVersion mempty
2 changes: 0 additions & 2 deletions cabal-testsuite/PackageTests/Regression/T5213/cabal.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# cabal new-test
Warnings found while parsing the project file, cabal.project:
- cabal.project:4:3: The field "library-coverage" is deprecated in the Cabal specification version 1.22. Please use 'coverage' field instead.
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
Expand Down
12 changes: 12 additions & 0 deletions changelog.d/12357.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
synopsis: Drop deprecation warnings for library-coverage and prefer-version flags
packages: [cabal-install]
prs: 12080
issues: 12357
---

The `library-coverage` and `prefer-version` flags of `cabal-install` were marked as deprecated with
reference to versions of the unrelated `.cabal` format spec, which is confusing, so we have dropped these
messages.
These flags are deprecated and we will likely re-introduce deprecation messages
when we have a better way to communicate that.
Loading