-
Notifications
You must be signed in to change notification settings - Fork 695
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
Why do we add trailing zeros to our versions of cabal-install
?
#7771
Comments
The latest Note, there is no cabal spec version In hindsight, cabal format, See also https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07, IIRC there was discussion (maybe even an issue) to add that to the Cabal's manual. That would help a lot! |
@jneira: I intended this rather as a developer discussion, with possible outcome to either add developer documentation to justify the current practice, or to change the current practice (dropping trailing zeros). @phadej: I am aware of the differences between Cabal, cabal-install, and the CABAL spec ( |
I'd assume that if Compare: We talk about GHC-8.10, but it's GHC-8.10.7 atm. I think this issue is mostly aesthetic, whether we have
We can argue that
|
GHC avoids this issue by not releasing The argument with Thanks for the clarification, @phadej! |
Hackage shows the following versions of
cabal-install
:0.4.0, 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.6.2, 0.6.4, 0.8.0, 0.8.2, 0.10.0, 0.10.2, 0.14.0, 0.14.1, 1.16.0, 1.16.0.1, 1.16.0.2, 1.16.1.0, 1.18.0, 1.18.0.1, 1.18.0.2, 1.18.0.3, 1.18.0.4, 1.18.0.5, 1.18.0.6, 1.18.0.7, 1.18.0.8, 1.18.1.0, 1.18.2.0, 1.20.0.0, 1.20.0.1, 1.20.0.2, 1.20.0.3, 1.20.0.4, 1.20.0.5, 1.20.0.6, 1.20.1.0, 1.20.2.0, 1.22.0.0, 1.22.0.1, 1.22.2.0, 1.22.3.0, 1.22.4.0, 1.22.5.0, 1.22.6.0, 1.22.7.0, 1.22.8.0, 1.22.9.0, 1.24.0.0, 1.24.0.1, 1.24.0.2, 2.0.0.0, 2.0.0.1, 2.2.0.0, 2.4.0.0, 2.4.1.0, 3.0.0.0, 3.2.0.0, 3.4.0.0, 3.4.1.0, 3.6.0.0, 3.6.2.0
Starting with
1.20.0.0
, exactly four version positions are used, even if the last ones are zeros. Before that, three positions were used unless there was a fourth different from zero.I know there is a culture in IT, even spreading beyond IT, to write
1.0
instead of just1
to indicate a version number. But why several trailing zeros?One reason may be that the discussion haskell/pvp#4 isn't finished yet. So there is a theoretical possibility to name consecutive versions
0.0
,0.0.0
,0.0.0.0
. By filling the trailing zeros in from the beginning, such abuse is prevented.Why do I care? I one keeps several versions of
cabal-install
around it is natural to name themcabal-$VERSION
. However, I find e.g.cabal-3.2.0.0
quite unnatural when I can name itcabal-3.2
(try to pronounce both!). A canonical name that is practical is imo a name without the trailing zeros. If this would be the same as the official version (i.e. if we released as3.2
), I could assume that others also name itcabal-3.2
. Now, I must assume that some name itcabal-3.2.0.0
and somecabal-3.2
.Note also that the
cabal-version
field that follows the versions ofCabal
andcabal-install
does not use trailing zeros.Maybe there are some written documents on the decision to use 4-position version numbers always for Cabal/cabal-install, helping to understand the current practice?
The text was updated successfully, but these errors were encountered: