• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 29201948407

12 Jul 2026 05:24PM UTC coverage: 92.971%. Remained the same
29201948407

push

github

web-flow
Don't invalidate BUILD files on comment/whitespace changes (#23480)

Currently, `pants --changed-since` unnecessarily invalidates all targets
within a `BUILD` file when only whitespace or unrelated comment lines
are modified. The system falls back to a blanket invalidation because it
assumes the entire file's structural integrity changed.

### Solution
When `--changed-since` interacts with the SCM, it already populates
`sources_blocks` with the precise modified lines. However, the fallback
condition in `find_owners` was still applying a blanket invalidation to
all targets in the modified `BUILD` file, ignoring this block-level
precision.

This PR adds a guard to skip this blanket invalidation if
`sources_blocks` are available for the file, allowing `block_owners` to
correctly filter only the affected targets natively.

2 of 3 new or added lines in 2 files covered. (66.67%)

1 existing line in 1 file now uncovered.

94540 of 101688 relevant lines covered (92.97%)

3.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.64
/src/python/pants/engine/internals/graph.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc