Skip to content

Commit

Permalink
Use Paths_cabal_install for cabal-install version number (#9421)
Browse files Browse the repository at this point in the history
* Use PackageInfo for cabal-install version number

* Use Paths_cabal_install instead

* Adjust documentation

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and julialongtin committed Dec 2, 2023
1 parent 78c1c24 commit d36b9f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ library
default-extensions: TypeOperators

hs-source-dirs: src
other-modules:
Paths_cabal_install
exposed-modules:
-- this modules are moved from Cabal
-- they are needed for as long until cabal-install moves to parsec parser
Expand Down
12 changes: 5 additions & 7 deletions cabal-install/src/Distribution/Client/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ module Distribution.Client.Version

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.
--
import qualified Paths_cabal_install as PackageInfo

-- |
-- This value determines the output of `cabal-install --version`.
cabalInstallVersion :: Version
cabalInstallVersion = mkVersion [3, 11]
cabalInstallVersion = mkVersion' PackageInfo.version

0 comments on commit d36b9f1

Please sign in to comment.