Skip to content

Conversation

@geekosaur
Copy link
Collaborator

@geekosaur geekosaur commented Dec 12, 2025

It was incorrectly displaying (in-tree) when there was no git information. Also, the spacing was slightly incompatible with older versions.

This should restore 100% compatibility with older versions of cabal-install, for scripts that parse cabal --version output.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

It was incorrectly displaying `(in-tree)` when there was no git
information. Also, the spacing was slightly incompatible with older
versions.

This should restore 100% compatibility with older versions of
`cabal-install`, for scripts that parse `cabal --version` output.
@geekosaur
Copy link
Collaborator Author

geekosaur commented Dec 13, 2025

QA notes:

Build cabal for release (cabal --project-file=cabal.release.project build cabal).
Run the following: (assumes you have cabal-3.14.2.0 and cabal-3.16.0.0 installed via e.g. ghcup)

hilfy Z$ cabal-3.14.2.0 --version | sed 's/$/~/'
cabal-install version 3.14.2.0~
compiled using version 3.14.2.0 of the Cabal library ~
hilfy Z$ cabal-3.16.0.0 --version | sed 's/$/~/'
cabal-install version 3.16.0.0 ~
compiled using version 3.16.0.0 of the Cabal library (in-tree)~
hilfy Z$ $(cabal list-bin cabal) --version | sed 's/$/~/' 
cabal-install version 3.17.0.0~
compiled using version 3.17.0.0 of the Cabal library ~

3.14.2.0 is the original output. (I assume the extra space crept in when the Cabal library version was added.)
3.16.0.0 is the buggy output.
The final one is the fixed output; it should match 3.14.2.0 aside from the reported versions, in particular in the final spaces. Note that 3.16.0.0 has both (in-tree) and an extra space at the end of the first line.

@geekosaur geekosaur added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Dec 15, 2025
@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git revision information broke compatibility of --version output

3 participants