-
Notifications
You must be signed in to change notification settings - Fork 9
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
add option to skip version check for cran_package() #108
Conversation
Thanks! This is however a bug, |
Honestly, as mentioned in #39, valid version numbers can be almost anything. While there are guidelines for semantical versioning, not all packages follow them and, ultimately, the package's author has the last say on how to name the version. Thus, the implementation would basically look like |
For very old packages, yes. Otherwise in the past 20 years or so they have to look like this: ❯ base::.standard_regexps()$valid_package_version
[1] "([[:digit:]]+[.-]){1,}[[:digit:]]+" But yeah, we can just drop that check, and only check if it is a non-NA string scalar. |
Ahh, didn't know that, interesting! I'm on board with dropping that, should I implement this check? |
YEs, please. Thanks! Just have an |
I saw you using |
Checking the failing tests...
|
Okay, I believe I might have fixed failing tests. I went as far as submitting versionsort to CRAN, but for now I copied version sorting code into |
Thanks, and I am sorry for the long wait. I ended up solving this a different way. |
Sometimes packages have version names that don't fit into
is_package_version()
requirements. For example,xtable
, which consistently names its versions in1.X-X
pattern. These names are returned bycran_package_history()
and I'd expect them to be usable incran_package()
no matter the form (in fact, I use this very pipeline indeepdep
package).Since I don't want to break backwards compatibility, I added
check_version
argument with defaultTRUE
value that allows the user to skipis_package_version()
check. Documented and tested the behaviour to make sure everything works.Side note, 4 tests fail now (and they did before I changed anything in the code), because
igraph
is no more the top search result, it'scrayon
now.