Skip to content

Commit bc0527b

Browse files
speak-agentclaude
andcommitted
prepare: two comments describe the code rather than the refactoring that produced it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f582a6c commit bc0527b

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎src/build/prepare/graph.cpp‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,10 +2256,8 @@ std::expected<void, std::string> phase4b_graph_worklist(PrepareState& state) {
22562256
// refused by default and built under `--cache=local`. Every edge counts,
22572257
// build-only ones included, as the key walk counts them.
22582258
{
2259-
// Named visitState, not state: this block's own local shadows the
2260-
// PrepareState reference of the same name, which the rename pass that
2261-
// promoted `packages`/`dependencyEdges` to state members cannot see
2262-
// (a name introduced after that pass, not by it).
2259+
// Named visitState, not state: `state` is this function's PrepareState
2260+
// parameter, which the loop below also reads.
22632261
std::vector<int> visitState(state.packages.size(), 0); // 0 new / 1 on stack / 2 done
22642262
std::vector<std::size_t> stack, cycle;
22652263
auto visit = [&](auto&& self, std::size_t u) -> bool {

‎src/build/prepare/plan.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ std::expected<BuildContext, std::string> phase13_finish(PrepareState& state) {
775775
// Section 2 of the design record measured that shape: a valid, empty,
776776
// 52 KB installer with nothing said about it.
777777
std::set<std::string> stageDirNoPass, stageDirWrongRole;
778-
// Carried from the state.overrides so the refusal below can say WHY there is
778+
// Carried from `state.overrides` so the refusal below can say WHY there is
779779
// no tree, which is a different sentence from "you are not packaging".
780780
std::string stageDirWhy;
781781
// WHETHER *THIS* ACTION REFERENCED THE STAGED TREE, and deliberately a

0 commit comments

Comments
 (0)