-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-36883: [R] Remove version number which triggers CRAN warning #36884
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
|
|
|
|
||
| # Small dev versions are added for R-only changes during CRAN submission. | ||
| if (is.na(dev_version) || dev_version < 100) { | ||
| if (is.na(dev_version) || dev_version < "100") { |
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.
Does the logic still work? gt/lt string comparisons can be funky iirc. Maybe we should explicitly convert it to a version object (or what ever it's called)
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 is what was recommended in the email from CRAN, but you're right, i.e. "10" > "2" == FALSE.
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.
Actually, nope, it doesn't matter; because dev_version is a package_version object, it's fine (i.e. in this case testing that a dev version of 10 is higher than the string "2" returns TRUE in the above comparison when done with the right classes)
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.
x <- package_version("0.0.0.10")[1, 4]
x
#> [1] '10'
x > 2
#> [1] TRUECreated on 2023-07-27 with reprex v2.0.2
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.
Ah nice, yay for implicit casts :D
…apache#36884) ### What changes are included in this PR? Updates package version number to be character not numeric ### Are these changes tested? No, is configure scripts ### Are there any user-facing changes? No * Closes: apache#36883 Authored-by: Nic Crane <thisisnic@gmail.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>
…apache#36884) ### What changes are included in this PR? Updates package version number to be character not numeric ### Are these changes tested? No, is configure scripts ### Are there any user-facing changes? No * Closes: apache#36883 Authored-by: Nic Crane <thisisnic@gmail.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>
What changes are included in this PR?
Updates package version number to be character not numeric
Are these changes tested?
No, is configure scripts
Are there any user-facing changes?
No