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
Switch branch detection to respect R_BIOC_VERSION #580
Conversation
@jimhester once again, thanks for your replies on #578. I wanted to follow up here - if the intention of the environment variable R_BIOC_VERSION is to force a specific bioconductor version, I believe it should fully respect that setting in bioconductor_branch() too, which this PR adds. Unless I'm missing something, currently even if R_BIOC_VERSION is set, bioconductor_branch() is always going to pull from the git release branch. This is a very discrete update that defers to R_BIOC_VERSION if set. |
R/install-bioc.R
Outdated
@@ -254,10 +254,12 @@ bioconductor_branch <- function(release, sha) { | |||
sha | |||
} else { | |||
if (is.null(release)) { | |||
release <- "release" | |||
release <- ifelse(Sys.getenv("R_BIOC_VERSION") != "", yes = Sys.getenv("R_BIOC_VERSION"), no = "release") |
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.
release <- ifelse(Sys.getenv("R_BIOC_VERSION") != "", yes = Sys.getenv("R_BIOC_VERSION"), no = "release") | |
release <- Sys.getenv("R_BIOC_VERSION", "release") |
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.
good point - changed
Respond to code review
Thanks, can you please add a bullet to NEWS? It should briefly describe the change and end with |
@jimhester OK, added NEWS |
@jimhester Thanks for replying on the issue. My original idea here involved making a redundant option() to hold the git branch used when querying bioconductor. This updated PR simply uses the already supported R_BIOC_VERSION environment variable, and ensures that when querying git we use a branch that respects that setting.
There seem to be tests that need updating, which i would do if this is something you'd consider.
The remotes/bioconductor configuration is complex and maybe I'm missing something. However, if R_BIOC_VERSION is supposed to force remotes to use a specific version it seems like it should be respected on this codepath too.