Skip to content

Commit

Permalink
3.14: make Cabal-hooks version track Cabal version (#10579)
Browse files Browse the repository at this point in the history
* Make Cabal-hooks version track Cabal version

As pointed out in #10412, it isn't currently feasible to version the
Cabal-hooks version separately from Cabal due to the large amount of
re-exports (in particular the LocalBuildInfo type and its dependencies).

For the time being, we will version Cabal-hooks along with the major
Cabal library version.

* Update Cabal-hooks/changelog.md

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
sheaf and mergify[bot] authored Dec 6, 2024
1 parent 269fd80 commit 99386c1
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cabal-hooks/Cabal-hooks.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: Cabal-hooks
version: 0.1
version: 3.14
copyright: 2023, Cabal Development Team
license: BSD-3-Clause
license-file: LICENSE
Expand Down
2 changes: 1 addition & 1 deletion Cabal-hooks/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog for `Cabal-hooks`

## 0.1December 2023
## 3.14November 2024

* Initial release of the `Hooks` API.

2 changes: 1 addition & 1 deletion Cabal-hooks/src/Distribution/Simple/SetupHooks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Usage example:
> custom-setup
> setup-depends:
> base >= 4.18 && < 5,
> Cabal-hooks >= 0.1 && < 0.2
> Cabal-hooks >= 3.14 && < 3.15
>
> The declared Cabal version should also be at least 3.14.
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/linux-9.0.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"revision": null,
"source": "local",
"src_sha256": null,
"version": "0.1"
"version": "3.14"
},
{
"cabal_sha256": "60e78b6c60dc32a77ce6c37ed5ca4e838fc5f76f02836ef64d93cd21cc002325",
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/linux-9.2.8.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
"revision": null,
"source": "local",
"src_sha256": null,
"version": "0.1"
"version": "3.14"
},
{
"cabal_sha256": "60e78b6c60dc32a77ce6c37ed5ca4e838fc5f76f02836ef64d93cd21cc002325",
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/linux-9.4.8.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
"revision": null,
"source": "local",
"src_sha256": null,
"version": "0.1"
"version": "3.14"
},
{
"cabal_sha256": "60e78b6c60dc32a77ce6c37ed5ca4e838fc5f76f02836ef64d93cd21cc002325",
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/linux-9.6.4.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"revision": null,
"source": "local",
"src_sha256": null,
"version": "0.1"
"version": "3.14"
},
{
"cabal_sha256": "60e78b6c60dc32a77ce6c37ed5ca4e838fc5f76f02836ef64d93cd21cc002325",
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/linux-9.8.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"revision": null,
"source": "local",
"src_sha256": null,
"version": "0.1"
"version": "3.14"
},
{
"cabal_sha256": "60e78b6c60dc32a77ce6c37ed5ca4e838fc5f76f02836ef64d93cd21cc002325",
Expand Down
8 changes: 3 additions & 5 deletions cabal-testsuite/main/cabal-tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,10 @@ buildCabalLibsSpecific ver verb mbGhc builddir_rel = do
csgot <- doesDirectoryExist (dir </> "Cabal-syntax-" ++ ver)
unless csgot $
runProgramInvocation verb ((programInvocation cabal ["get", "Cabal-syntax-" ++ ver]) { progInvokeCwd = Just dir })
let hooksVerFromVer _ = "0.1"
hooksVer = hooksVerFromVer ver
chgot <- doesDirectoryExist (dir </> "Cabal-hooks-" ++ hooksVer)
chgot <- doesDirectoryExist (dir </> "Cabal-hooks-" ++ ver)
unless chgot $
runProgramInvocation verb ((programInvocation cabal ["get", "Cabal-hooks-" ++ hooksVer]) { progInvokeCwd = Just dir })
buildCabalLibsProject ("packages: Cabal-" ++ ver ++ " Cabal-syntax-" ++ ver ++ " Cabal-hooks-" ++ hooksVer) verb mbGhc dir
runProgramInvocation verb ((programInvocation cabal ["get", "Cabal-hooks-" ++ ver]) { progInvokeCwd = Just dir })
buildCabalLibsProject ("packages: Cabal-" ++ ver ++ " Cabal-syntax-" ++ ver ++ " Cabal-hooks-" ++ ver) verb mbGhc dir


buildCabalLibsIntree :: String -> Verbosity -> Maybe FilePath -> FilePath -> IO [FilePath]
Expand Down

0 comments on commit 99386c1

Please sign in to comment.