-
Notifications
You must be signed in to change notification settings - Fork 287
cran_version()
should be more robust
#1857
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
Comments
If |
Are you aiming for a point release anytime soon? Thanks! |
I don't have concrete plans because this is literally the only thing that would be in it. Since we just released 1 year's worth of maintenance, I suspect a few more smallish things will come up in the medium term. So maybe once there's a couple little things, we'll do a patch release. |
I ended up needing to do a patch release anyway, so this fix will presumably be in usethis 2.2.1. |
Several functions (
use_release_checklist()
,use_news_md()
) callcran_version()
to check if a package is on CRAN, which fails if a CRAN mirror is not set.cran_version()
callsavailable.packages()
which in turn callscontrib.url()
withrepos = getOption("repos")
. If the CRAN mirror is unset (the default value is"@CRAN@"
in a factory fresh installation) it will prompt a user to choose in an interactive session, or fail otherwise:This is showing up in revdep checks and CRAN checks for some usethis reverse depenencies which use
use_news_md()
. E.g., cynkra/fledge#683cran_version()
should not fail if there is no internet, or if there is no CRAN mirror set. In the former case, it should likely returnNULL
, which it currently returns if the package is not on CRAN. That seems like a reasonable fallback. If there is no CRAN mirror set we should try to set one locally, and also wrap that in atryCatch()
, returningNULL
again if still unsuccessful.This was surfaced in revdepchecks for #1849, was at first thought to be a false positive, and did not cause issues on incoming checks, but is causing failures for revdeps on CRAN.
The text was updated successfully, but these errors were encountered: