Skip to content

Fix #7569 for cabal-install: bump to 3.7 #7683

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 3 commits into from
Sep 27, 2021
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
1 change: 1 addition & 0 deletions cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ library
Distribution.Client.Utils.Json
Distribution.Client.Utils.Parsec
Distribution.Client.VCS
Distribution.Client.Version
Distribution.Client.Win32SelfUpgrade
Distribution.Client.World

Expand Down
8 changes: 4 additions & 4 deletions cabal-install/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ import Distribution.Client.Types.Credentials (Password (..))
import Distribution.Client.Init (initCmd)
import Distribution.Client.Manpage (manpageCmd)
import Distribution.Client.ManpageFlags (ManpageFlags (..))
import Distribution.Client.Utils (determineNumJobs
,relaxEncodingErrors
,cabalInstallVersion
)
import Distribution.Client.Utils
( determineNumJobs, relaxEncodingErrors )
import Distribution.Client.Version
( cabalInstallVersion )

import Distribution.Package (packageId)
import Distribution.PackageDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import Prelude ()

import Distribution.CabalSpecVersion
import Distribution.Client.BuildReports.Types
import Distribution.Client.Utils (cabalInstallVersion)
import Distribution.Client.Version (cabalInstallVersion)
import Distribution.Compiler (CompilerId (..))
import Distribution.FieldGrammar
import Distribution.Fields (readFields, showFields)
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ import Distribution.Simple.Program
( defaultProgramDb )
import Distribution.Simple.Utils
( die', notice, warn, lowercase, cabalVersion, toUTF8BS )
import Distribution.Client.Utils
import Distribution.Client.Version
( cabalInstallVersion )
import Distribution.Compiler
( CompilerFlavor(..), defaultCompilerFlavor )
Expand Down
4 changes: 3 additions & 1 deletion cabal-install/src/Distribution/Client/HttpUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ import Distribution.Simple.Utils
( die', info, warn, debug, notice
, copyFileVerbose, withTempFile, IOData (..) )
import Distribution.Client.Utils
( withTempFileName, cabalInstallVersion )
( withTempFileName )
import Distribution.Client.Version
( cabalInstallVersion )
import Distribution.Client.Types
( unRepoName, RemoteRepo(..) )
import Distribution.System
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/ProjectPlanOutput.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Distribution.Client.Types.PackageLocation (PackageLocation(..))
import Distribution.Client.Types.ConfiguredId (confInstId)
import Distribution.Client.Types.SourceRepo (SourceRepoMaybe, SourceRepositoryPackage (..))
import Distribution.Client.HashValue (showHashValue, hashValue)
import Distribution.Client.Utils (cabalInstallVersion)
import Distribution.Client.Version (cabalInstallVersion)

import qualified Distribution.Client.InstallPlan as InstallPlan
import qualified Distribution.Client.Utils.Json as J
Expand Down
5 changes: 0 additions & 5 deletions cabal-install/src/Distribution/Client/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module Distribution.Client.Utils
, relaxEncodingErrors
, ProgressPhase (..)
, progressMessage
, cabalInstallVersion
, pvpize
, incVersion
, getCurrentYear
Expand Down Expand Up @@ -394,10 +393,6 @@ progressMessage verbosity phase subject = do
ProgressInstalling -> "Installing "
ProgressCompleted -> "Completed "

-- TODO: write a test around this. Don't abuse Paths_cabal_install.
--
cabalInstallVersion :: Version
cabalInstallVersion = mkVersion [3,6]

-- | Given a version, return an API-compatible (according to PVP) version range.
--
Expand Down
16 changes: 16 additions & 0 deletions cabal-install/src/Distribution/Client/Version.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- | Provides the version number of @cabal-install@.

module Distribution.Client.Version
( cabalInstallVersion
) where

import Distribution.Version

-- This value determines the `cabal-install --version` output.
--
-- It is used in several places throughout the project, including anonymous build reports, client configuration,
-- and project planning output. Historically, this was a @Paths_*@ module, however, this conflicted with
-- program coverage information generated by HPC, and hence was moved to be a standalone value.
--
cabalInstallVersion :: Version
cabalInstallVersion = mkVersion [3,7]