Skip to content
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

Merged
merged 11 commits into from
Sep 16, 2019
Merged

I71 - lookup R versions on HPC portal #72

merged 11 commits into from
Sep 16, 2019

Conversation

weshinsley
Copy link
Contributor

@weshinsley weshinsley commented Sep 16, 2019

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.

R/config.R Outdated
##
## Caching for versions, so we don't hit the API excessively

cluster_r_versions <- NULL
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants