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

pantsbuild / pants / 21414638008

27 Jan 2026 09:19PM UTC coverage: 80.269%. Remained the same
21414638008

push

github

web-flow
Fix non-deterministic JDK preparation script causing cache misses (#23036)

The JDK preparation script (`jdk.sh`) embeds the output of `java
-version` as a comment. However, when Coursier downloads the JDK, it
outputs progress messages to stderr which get mixed with the actual
`java -version` output.

These progress messages are non-deterministic (contain timing info like
"Still downloading", "Downloaded", etc.) which causes the script content
to vary between runs, resulting in different cache keys for all JVM
compilation tasks.

This fix filters out Coursier download progress messages from the
captured stderr, keeping only the actual `java -version` output lines.

Impact: In testing, this reduced cache misses from 92% to 0.09% for JVM
builds across runs.

0 of 2 new or added lines in 1 file covered. (0.0%)

78764 of 98125 relevant lines covered (80.27%)

3.36 hits per line

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

61.17
/src/python/pants/jvm/jdk_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