Select correct source when crandb and CRAN return same version.#2220
Open
aramirezreyes wants to merge 3 commits intorstudio:mainfrom
Open
Select correct source when crandb and CRAN return same version.#2220aramirezreyes wants to merge 3 commits intorstudio:mainfrom
aramirezreyes wants to merge 3 commits intorstudio:mainfrom
Conversation
Collaborator
|
Looks like tests are failing -- are you able to investigate? |
Author
|
I tried in two different R versions and I cannot reproduce the failed tests. Would you mind re-triggering the tests? I wonder if we were unlucky and crandb was unreachable. I also added a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This works relates to #1735
Disclaimer: I got help from cursor AI to help me understand the flow of some of these functions and critique my solutions.
I think I have a solution for the problems at the end of that discussion, but I may need some handholding and reassurance I am not breaking other cases. Could someone take a look at this?
Problem 1: when trying to install a package, if
options(renv.config.crandb.enabled = TRUE), the install when crandb returns the live version of CRAN. Renv will try to build a URL to get the file from the archive. But the archive does not have that file as it is the live version.Solution 1: when both repo and crandb return the same version, select the one with url (repo)
Problem 2: The version is converted to its numeric value, so when trying to build a URL, the version is incorrect: (1.1-3 is converted to 1.1.3, leading to an incorrect url).
Solution 2: leave the value untouched for building the url.
I added a test, which seems to work but I am getting a few failed tests locally. I probably do not the correct setup to run the full test suite.