Skip to content

Serial install fallback: dependency order and retries - #252

Merged
eliotmcintire merged 1 commit into
developmentfrom
fix/serialFallbackRetry
Dec 4, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
fix/serialFallbackRetry

Conversation

@eliotmcintire

Copy link
Copy Markdown
Contributor

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), called pakSerialInstall() 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 join deferred and go through that same final phase.

New test in test-29coverage5_testthat.R: adependent needs zdependency and 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: b in "each is installed on its own", and archA/archB before the CRAN-archive fallback. test-24deferVersionFloor and test-16installFailureMetadata pass.

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

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>
@eliotmcintire eliotmcintire added the bug Something isn't working label Dec 4, 2026
@eliotmcintire
eliotmcintire merged commit 33ae69f into development Dec 4, 2026
21 checks passed
@eliotmcintire
eliotmcintire deleted the fix/serialFallbackRetry branch December 4, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant