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

pantsbuild / pants / 37100435339
93%

Build:
DEFAULT BRANCH: main
Ran 03 Oct 2026 05:43AM UTC
Jobs 11
Files 1783
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Oct 2026 05:37AM UTC coverage: 92.92% (-0.002%) from 92.922%
37100435339

push

github

web-flow
jvm: use argfiles for JVM and JVM-compiler process arguments (#23620)

## Problem

JVM processes that don't use nailgun — JUnit/ScalaTest test runs
(`use_nailgun=False`), `pants run`, and deploy-jar execution — invoke
the `java` binary with their full classpath and argument list passed
directly on the command line via `argv`. For components with many
dependencies or a long classpath, this can exceed OS-level command-line
length limits (e.g. `MAX_ARG_STRLEN`/`ARG_MAX` on Linux/macOS), causing
the process to fail with an "Argument list too long" style error.

Concrete case hit in practice: `pants test` on a JUnit 5 target with a
~250-jar classpath (Spark + Hadoop + Cassandra + Scala + Netty native
bundles) failed with `Os { code: 7, kind: ArgumentListTooLong, ... }`
when colon-joined into a single `-cp` argv element.

## Fix

- For Java 9+ JDKs, `JvmProcess` now writes the `java` invocation's
arguments (classpath plus JVM options and program args) to a `@argfile`
(`__jvm_args.txt`) instead of passing them on the command line, per the
[`java` command-line argument files
support](https://docs.oracle.com/javase/9/tools/java.htm#GUID-4856361B-8BFD-4964-AE84-121F5F6CF111)
added in JDK 9.
- This is gated on `not request.use_nailgun`: nailgun sends the
classpath and program arguments to the already-running server over a
socket rather than via argv, so nailgun-eligible processes (e.g.
compilation) were never subject to this limit and get no benefit from
the argfile — they keep using nailgun exactly as before this PR.
- Skip the argfile (fall back to inline argv) whenever a `{chroot}`
placeholder is present in the classpath or argv. That placeholder is
only substituted by the engine within a `Process`'s literal `argv` at
spawn time, never within file contents, so callers relying on it
(`run.py`, `run_deploy_jar.py`, which also run outside the sandbox via
`InteractiveProcess`) can't have those arguments moved into a file.

## Scoped out

An earlier version of thi... (continued)

48 of 53 new or added lines in 2 files covered. (90.57%)

95982 of 103295 relevant lines covered (92.92%)

3.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
92.67
-1.59% src/python/pants/jvm/jdk_rules.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_4/10 - 37100435339.1 03 Oct 2026 05:48AM UTC 1245
59.06
GitHub Action Run
2 test_python_linux_arm64 - 37100435339.2 03 Oct 2026 05:46AM UTC 1196
52.65
GitHub Action Run
3 test_python_linux_x86_64_8/10 - 37100435339.3 03 Oct 2026 05:47AM UTC 1214
52.73
GitHub Action Run
4 test_python_linux_x86_64_3/10 - 37100435339.4 03 Oct 2026 05:43AM UTC 1214
52.37
GitHub Action Run
5 test_python_linux_x86_64_5/10 - 37100435339.5 03 Oct 2026 05:44AM UTC 1230
60.37
GitHub Action Run
6 test_python_linux_x86_64_2/10 - 37100435339.6 03 Oct 2026 05:43AM UTC 1215
58.59
GitHub Action Run
7 test_python_linux_x86_64_1/10 - 37100435339.7 03 Oct 2026 05:44AM UTC 1215
48.86
GitHub Action Run
8 test_python_linux_x86_64_0/10 - 37100435339.8 03 Oct 2026 05:44AM UTC 1236
57.45
GitHub Action Run
9 test_python_linux_x86_64_7/10 - 37100435339.9 03 Oct 2026 05:46AM UTC 1219
50.88
GitHub Action Run
10 test_python_linux_x86_64_9/10 - 37100435339.10 03 Oct 2026 05:43AM UTC 1225
54.0
GitHub Action Run
11 test_python_linux_x86_64_6/10 - 37100435339.11 03 Oct 2026 05:43AM UTC 1212
50.05
GitHub Action Run
Source Files on build 37100435339
  • Tree
  • List 1783
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37100435339
  • e20cd55c on github
  • Prev Build on main (#36818731627)
  • Next Build on main (#37360173709)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc