Suppress failed binary output after source fallback#2332
Open
LeonidasZhak wants to merge 1 commit into
Open
Conversation
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.
Summary
Suppress output from failed repository retrieval candidates when a later candidate succeeds.
Thanks to maintainers
Thanks for maintaining renv and for documenting the binary-to-source fallback behavior in #1727.
Issue or motivation
Closes #1727. When a binary archive is unavailable but the source archive can be downloaded, users currently see an
ERRORline immediately followed by a successful download for the same package.Root cause
Each retrieval candidate writes its download result before renv knows whether another candidate will succeed. The same download condition can also be collected once when signaled and again when the candidate stops.
Change
Capture output separately for each repository retrieval candidate and replay only the output from the candidate that succeeds. If every candidate fails, keep the existing aggregate error reporting. Avoid adding a final thrown error when that candidate already signaled a retrieval error.
Tests
NOT_CRAN=true RENV_EXT_ENABLED=FALSE Rscript -e 'devtools::test(filter = "retrieve", stop_on_failure = TRUE)'(25 passed, 13 expected skips)RENV_EXT_ENABLED=FALSE R CMD build .RENV_EXT_ENABLED=FALSE R CMD check --no-manual renv_1.2.3.9000.tar.gz(Status: OK)Scope
No changes to repository queries, candidate ordering, package selection, installation behavior, or public APIs.