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

pantsbuild / pants / 25401284162

pending completion
25401284162

push

github

web-flow
Fix jar-tool repacking for DEFLATED ZIP entries that use data descriptors (Cherry-pick of #23315) (#23318)

Fixes #23316 

## Summary

- fix jar-tool repacking for DEFLATED ZIP entries that use data
descriptors
- add a regression test covering the failing repack path

## Why

The old fast path copied raw compressed bytes by temporarily treating
DEFLATED entries as STORED and patching metadata afterward. That works
for ordinary entries, but it breaks when the source ZIP entry uses a
data descriptor, where size and CRC are finalized after the entry data
instead of being fully available in the local header.
In that case jar-tool could write inconsistent metadata and fail with
ZipException while building deploy jars. This change keeps the fast path
for normal DEFLATED entries, but falls back to safe copy/recompression
for data-descriptor entries.

Co-authored-by: Gregory Borodin <grihabor@gmail.com>

38 of 38 new or added lines in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

91804 of 98809 relevant lines covered (92.91%)

3.72 hits per line

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

93.53
/src/python/pants/backend/python/providers/python_build_standalone/rules.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