-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Document the fields of VersionNumber
#50179
Conversation
I believe immutability allows for better compile time comparisons. Is there a case where there's a length greater than 1? |
Yes, the two fields can have any number of prerelease or build tags separated by a comma. |
test/version.jl
Outdated
@@ -219,6 +219,12 @@ for major=0:3, minor=0:3, patch=0:3 | |||
end | |||
end | |||
|
|||
# banner | |||
import Base.banner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't exist anymore on master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must have been a rebasing problem. Fixed, thanks!
`VersionNumber`'s fields are currently not documented, and therefore, private by default. However, if people want to use `VersionNumber` for anything other than the documented comparison operations, users will have to access the fields.
3360631
to
c2155af
Compare
OK - rebased and ready.
|
VersionNumber
's fields are currently not documented, and therefore, private by default.However, if people want to use
VersionNumber
for anything other than the documented comparison operations, users will have to access the fields.Questions for reviewers
Do we want this? Normally, fields are not documented for a reason. But I feel like it's hard to use
VersionNumber
for much in practice without access to its fields, unless we add several more methods such asmajor(::VersionNumber)
etc.Should we change the field type of
.prerelease
and.build
fromTuple{Vararg{T}}
toVector{T}
? It seems like it was changed fromVector
toTuple
in ef69a19 to make VersionNumber immutable. I'm not sure why that's a good thing, since it currently means accessing.prerelease
is type unstable but there might be a good reason.