-
Notifications
You must be signed in to change notification settings - Fork 4
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
I71 - lookup R versions on HPC portal #72
Conversation
R/config.R
Outdated
## | ||
## Caching for versions, so we don't hit the API excessively | ||
|
||
cluster_r_versions <- NULL |
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.
I don't think this will work in the installed package. Typically we do this with a package environment so something like
cache <- new.env(parent.env = emptyenv())
then assigning into that
if (is.null(cache$r_versions) || refresh) {
...
cache$r_versions <- whatever
}
I don't think we need the time-based caching here - once per session should be ample
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.
Done!
This seems to work for me locally - although I am getting a range of strange test failures in other places.
Update: 4 test failures on Win fixed, and a further 3 are skipped on windows. See https://vimc.myjetbrains.com/youtrack/issue/mrc-483 for the skipped ones.