Repository navigation
Serial install fallback: dependency order and retries - #252
Merged
Merged
Conversation
When pak's batch fails with no culprit it can parse, identify-and-defer installed the missing refs once each, in the order given, and stopped. A dependent tried before its dependency failed for good. The refs now join the deferred culprits, whose final phase orders them by dependency and retries while installs make progress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
When pak can't install a set of packages together and doesn't say which one failed, Require installs them one at a time. It did that in alphabetical order with no second try, so a package that came before its own dependency failed and was reported as not installed. This is why the MPB module CI could not install BioSIM, LandR or pemisc.
Affects: packages that failed this way now install, at the cost of one more try for a package that truly cannot install.
Technical details
R/pak.R, the "no parseable culprits" branch of identify-and-defer (previously lines 4113-4127), calledpakSerialInstall()once and broke out of the loop. The deferred-culprit path just below already orders refs by dependency (orderRefsByMissingDepEdges()) and retries while installs make progress. The fallback refs now joindeferredand go through that same final phase.New test in
test-29coverage5_testthat.R:adependentneedszdependencyand comes first. It failed before the fix (tried once, "could not be installed") and passes now. Two existing tests now expect one more try for a package still missing after others were installed:bin "each is installed on its own", andarchA/archBbefore the CRAN-archive fallback.test-24deferVersionFloorandtest-16installFailureMetadatapass.Seen in https://github.com/achubaty/mpbRedTopSpread/actions/runs/47221689605: BioSIM was built before J4R, LandR before pemisc, and pemisc before peutils.
🤖 Generated with Claude Code