fix: support -a (all-deps) for fresh scoped builds#13
Merged
Conversation
When running `putup consumer/ -a` on a fresh build (no index), parse_scopes restricted parsing to only the target directory. If a producer Tupfile output to a different directory (e.g., shared/), the demand-driven parser couldn't trace the dependency, leaving ghost nodes unresolved. Three coordinated changes: 1. Parse all Tupfiles when -a is set, so ghost nodes get resolved by their producer Tupfiles regardless of scope. 2. Add ScopeWithUpstream build mode — limits execution to scope + transitive upstream producers via build_subset(), preventing a full project build when only scope deps are needed. 3. Add hint to ghost error messages suggesting -a as a remedy. Also refactors collect_upstream_files and the new collect_scope_with_upstream_commands to share a single walk_upstream_from_scope traversal, eliminating duplication. Co-Authored-By: Claude Opus 4.6 <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.
Summary
-aflag for fresh builds with cross-directory deps where the producer outputs to a directory with no Tupfile (ghost nodes left unresolved)ScopeWithUpstreambuild mode so-abuilds scope + transitive upstream only, not the entire project-acollect_upstream_filesandcollect_scope_with_upstream_commandsto sharewalk_upstream_from_scopetraversalTest plan
-asucceeds, without-afails (ghost),-askips unrelated dirs, incremental-adetects upstream changes🤖 Generated with Claude Code