-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Document the fields of VersionNumber
#50179
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
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
| 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
VersionNumberfor 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
VersionNumberfor 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
.prereleaseand.buildfromTuple{Vararg{T}}toVector{T}? It seems like it was changed fromVectortoTuplein ef69a19 to make VersionNumber immutable. I'm not sure why that's a good thing, since it currently means accessing.prereleaseis type unstable but there might be a good reason.