fix(pak): install deferred culprits in dependency order + retry pass#176
Merged
Merged
Conversation
identify-and-defer's final serial phase installed deferred build-failure culprits in deferral order. When both a dependency and its dependent were deferred (e.g. LandR and LandR.CS, which Imports LandR), the dependent could be built BEFORE its dependency: Building LandR.CS -> Failed: dependency 'LandR' is not available for package 'LandR.CS' ...later... Installed LandR => LandR.CS [build-error], never retried Two fixes: - orderRefsByMissingDepEdges(): topologically order the deferred culprits using pak's own "dependency 'X' is not available for package 'Y'" lines (Y depends on X) so X installs before Y. Index-based, stable, bails out of cycles without dropping refs. - Retry pass after the serial install: re-attempt still-missing culprits while progress is being made, so a dependency installed late in the pass unblocks its dependent. Surfaced under Require.noRemotes = TRUE on Linux R 4.6 where LandR/LandR.CS build from source and the dependent was attempted first. Test added. Bump .9034 -> .9035. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…singDepEdges R CMD check WARNING "checking code files for non-ASCII characters" (warnings-as- errors on CI) -- the regex used literal ‘ ’ (U+2018/U+2019). Replace with ‘ /’ escapes: ASCII source, identical runtime match (still parses pak's curly-quote "dependency 'X' is not available for package 'Y'" lines). Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Symptom
Under
Require.noRemotes = TRUE(Linux, R 4.6), the install ended with:LandR.CSImportsLandR. Both were deferred build-failure culprits, and theidentify-and-deferfinal serial phase installed them in deferral order — soLandR.CSwas built beforeLandR, failed its R CMD INSTALL pre-flight dep check, and was never retried onceLandRlanded.Fix
orderRefsByMissingDepEdges()— topologically order deferred culprits using pak's owndependency 'X' is not available for package 'Y'lines (Y depends on X), so X installs before Y. Index-based + stable; bails out of cycles without dropping refs; handles curly- and straight-quote messages.Regression test added (
orderRefsByMissingDepEdges: dependency ordered before dependent; no ref dropped; unrelated/foreign edges leave order intact). Bump2.0.0.9034→2.0.0.9035.🤖 Generated with Claude Code