Remove install_source_configs — Tupfile-driven config#11
Merged
Conversation
3065890 to
411d6c9
Compare
Config installation was hardcoded in C++ (scanning source tree for tup.config files and copying them to the build tree). This created ambiguity between variant build dirs and source config dirs, and encoded policy that belongs in the Tupfile. The configure pass already discovers and executes any rule outputting tup.config. A static config copy is just a trivial config-generating rule: `: defaults.config |> cp %f %o |> tup.config`. - Delete install_source_configs() and its call site (~62 lines) - Move load_ignore_list() into anonymous namespace (no external callers) - Rename BSP tup.config → defaults.config, add copy rules to Tupfiles - Rewrite 3 E2E tests to use copy rules, delete 2 obsolete tests - Update docs to describe the copy-rule pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
411d6c9 to
27c063e
Compare
Commands are stored as instruction patterns with NodeId operands. At execution time, expand_instruction() re-resolves NodeIds to paths relative to source CWD. In 3-tree builds (-C/-S/-B), overlay files like defaults.config live in config_root, not source_root. Without config_root awareness, expand_instruction produced bare filenames instead of cross-tree relative paths, causing cp to fail. Plumb config_root through SchedulerOptions → expand_instruction so the path resolver falls back to config_root when a file doesn't exist in source_root. 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
install_source_configs()from the configure pass (~62 lines of C++): defaults.config |> cp %f %o |> tup.configload_ignore_list()into anonymous namespace (no external callers remain)tup.config→defaults.configin 11 directories, add copy rules to each TupfileMotivation
install_source_configs()hardcodedtup.configas the filename to scan for in the source tree, creating ambiguity between variant build dirs and source config dirs. The configure pass already discovers and executes any rule outputtingtup.config— a static config copy is just a trivial config-generating rule.Test plan
make— putup builds itselfmake test— all 337 tests pass (2626 assertions)./build/test/unit/putup_test '[configure]'— all 19 configure tests passtup.configin build tree🤖 Generated with Claude Code