Skip to content

Commit

Permalink
Master: make Cabal-hooks version track Cabal version (#10580)
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
  • Loading branch information
sheaf authored Dec 18, 2024
1 parent 0025961 commit ad3c7cd
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 14 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.16
copyright: 2023, Cabal Development Team
license: BSD-3-Clause
license-file: LICENSE
Expand Down
8 changes: 7 additions & 1 deletion Cabal-hooks/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog for `Cabal-hooks`

## 0.1 – December 2023
## 3.16 – November 2024

* Release accompanying `Cabal-3.16`.
No changes to `Cabal-hooks` itself; all changes come changes in re-exports
from `Cabal`.

## 3.14 – November 2024

* Initial release of the `Hooks` API.

2 changes: 1 addition & 1 deletion Cabal-hooks/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build-type: Hooks
custom-setup
setup-depends:
Cabal-hooks >= 0.1 && < 0.2
Cabal-hooks >= 3.14 && < 3.15
```

and your `SetupHooks.hs` file should look like:
Expand Down
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 @@ -256,7 +256,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.16"
},
{
"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.16"
},
{
"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.16"
},
{
"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.16"
},
{
"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.16"
},
{
"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 @@ -184,12 +184,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 ad3c7cd

Please sign in to comment.