Strip: remove a dangling mod's multi-line attribute with it #211

Merged
jcoffey-dev merged 1 commits from fix/strip-multiline-attrs into main 2026-10-27 06:56:38 +00:00
Owner

Stripping upstream v1.0.0 failed the build check: crates/store lost pub struct Batch.

v1.0.0 declares its test modules under multi-line #[cfg(all(...))] attributes that point at a test checkout outside the public tree. remove_dangling_mods walked back only over lines starting with #[, so it left the attribute's tail behind, and that tail then applied to the next item.

The walk-back now takes a whole attribute, however many lines it spans. Adds tools/fork/tests/test_strip.py.

With this, strip.py --ref v1.0.0 verifies clean and compiles (68 files and 2,080 snippets removed, 533 dangling mods).

Stripping upstream v1.0.0 failed the build check: `crates/store` lost `pub struct Batch`. v1.0.0 declares its test modules under multi-line `#[cfg(all(...))]` attributes that point at a test checkout outside the public tree. `remove_dangling_mods` walked back only over lines starting with `#[`, so it left the attribute's tail behind, and that tail then applied to the next item. The walk-back now takes a whole attribute, however many lines it spans. Adds `tools/fork/tests/test_strip.py`. With this, `strip.py --ref v1.0.0` verifies clean and compiles (68 files and 2,080 snippets removed, 533 dangling mods).
jcoffey-dev added 1 commit 2026-10-27 05:31:58 +00:00
Strip: remove a dangling mod's multi-line attribute with it
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 6m26s
59e5c5c6db
Upstream v1.0.0 declares its test modules under multi-line #[cfg(all(...))]
attributes that point at a test checkout outside the public tree. Removing
the mod left the attribute's tail behind, which then applied to the next
item: crates/store lost pub struct Batch and the build check failed. The
walk-back now takes a whole attribute, however many lines it spans.
jcoffey-dev merged commit 845cc793aa into main 2026-10-27 06:56:38 +00:00
jcoffey-dev deleted branch fix/strip-multiline-attrs 2026-10-27 06:56:39 +00:00
Sign in to join this conversation.