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

Switch branch detection to respect R_BIOC_VERSION #580

Merged
merged 5 commits into from Feb 9, 2021
Merged

Switch branch detection to respect R_BIOC_VERSION #580

merged 5 commits into from Feb 9, 2021

Conversation

bbimber
Copy link
Contributor

@bbimber bbimber commented Feb 3, 2021

@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.

@bbimber
Copy link
Contributor Author

bbimber commented Feb 8, 2021

@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")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
release <- ifelse(Sys.getenv("R_BIOC_VERSION") != "", yes = Sys.getenv("R_BIOC_VERSION"), no = "release")
release <- Sys.getenv("R_BIOC_VERSION", "release")

Copy link
Contributor Author

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
R/install-bioc.R Outdated Show resolved Hide resolved
@jimhester
Copy link
Member

Thanks, can you please add a bullet to NEWS? It should briefly describe the change and end with (@yourname, #issuenumber).

@bbimber
Copy link
Contributor Author

bbimber commented Feb 8, 2021

@jimhester OK, added NEWS

@jimhester
Copy link
Member

jimhester commented Feb 9, 2021

Thanks a bunch!

@jimhester jimhester merged commit 69a8bd1 into r-lib:master Feb 9, 2021
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.

None yet

2 participants