Skip to content

Commit e946d82

Browse files
committed
fix(typed-builder): clean-checkout leftover check counts only .NET build output
The first official clean-checkout run reported the tracked Rust source directory rust/crates/own-shadow/src/bin as build output. Only a bin/ or obj/ beside a .csproj is .NET build output. Gate mechanics only; no registered expectation changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ZFvhLx1fM9Gerg4dKsZcL
1 parent 95d811b commit e946d82

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎scripts/typed_builder_gate.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,11 @@ def clean_checkout(runs: int, rust: str | None) -> int:
370370
print(f"FAIL: clean-checkout/run{n}: git worktree add: {added.stderr.strip()}")
371371
return 1
372372
try:
373-
leftovers = [d for _, dirs, _ in os.walk(tree) for d in dirs
374-
if d in ("bin", "obj")]
373+
# .NET build output: a bin/ or obj/ beside a project file (a tracked
374+
# directory that merely has the name, like a Rust `src/bin`, is source)
375+
leftovers = [os.path.relpath(os.path.join(base, d), tree)
376+
for base, dirs, names in os.walk(tree) for d in dirs
377+
if d in ("bin", "obj") and any(n.endswith(".csproj") for n in names)]
375378
if leftovers:
376379
print(f"FAIL: clean-checkout/run{n}: the worktree has build output: "
377380
f"{leftovers}")

0 commit comments

Comments
 (0)