Skip to content
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

cabal-install 3.10.2.0 returns wrong version #9415

Closed
benz0li opened this issue Nov 7, 2023 · 8 comments
Closed

cabal-install 3.10.2.0 returns wrong version #9415

benz0li opened this issue Nov 7, 2023 · 8 comments
Assignees

Comments

@benz0li
Copy link

benz0li commented Nov 7, 2023

Describe the bug

Executing cabal --version with cabal-install 3.10.2.0 returns cabal-install version 3.10.1.0.

To Reproduce

On a host (x86_64) with docker installed:

docker run --rm -ti glcr.b-data.ch/ghc/ghc-musl:9.8.1 bash

Inside the container:

cabal update \
  && cabal install --allow-newer --constraint 'Cabal-syntax<3.11' cabal-install-3.10.2.0
/root/.local/bin/cabal --version

Expected behavior

Executing cabal --version with cabal-install 3.10.2.0 returning cabal-install version 3.10.2.0.

System information

  • Alpine Linux 3.18.4
  • ghc version: 9.8.1
  • cabal version: 3.10.1.0

Additional context

execution-log.txt

Cross reference: https://discourse.haskell.org/t/cabal-install-3-10-2-0-released/8009/3

@Kleidukos
Copy link
Member

I can reproduce

@Kleidukos Kleidukos self-assigned this Nov 7, 2023
@mpickering
Copy link
Collaborator

What is the analysis for why this has happened?

@ulysses4ever
Copy link
Collaborator

Maybe, there should be a 3.10.3.0 (or 3.10.2.1?) that doesn't suffer this?

@Kleidukos
Copy link
Member

@benz0li Alright, with cabal-install-3.10.2.1 this should be solved. Would you mind trying on your side to confirm?

cabal update \
  && cabal install --allow-newer --constraint 'Cabal-syntax<3.11' cabal-install-3.10.2.1

@benz0li
Copy link
Author

benz0li commented Nov 7, 2023

@benz0li [...] Would you mind trying on your side to confirm?

Confirmed: execution-log.txt

@benz0li benz0li closed this as completed Nov 7, 2023
@benz0li
Copy link
Author

benz0li commented Nov 7, 2023

What is the analysis for why this has happened?

I would appreciate if you (@Kleidukos) answered @mpickering's question.

Thank you.

@Kleidukos
Copy link
Member

Fantastic, I'll report on the Discourse thread

@Kleidukos
Copy link
Member

Kleidukos commented Nov 7, 2023

Regarding the cause, I suspect a stale candidate that had been published. Indeed, the version number read by cabal --version is a constant defined in the code, not read from the cabal file, and as such it's very probable that the PR to bump the version to 3.10.2.0 missed it.

I think this mechanism should be dropped in favour of something more automatic, like the PackageInfo_* module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants