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

pantsbuild / pants / 46948860541

02 Dec 2026 07:12PM UTC coverage: 91.629% (-1.5%) from 93.113%
46948860541

push

github

web-flow
Upgrade to Coursier 2.1.27 (#23792)

There were some issues with Coursier 2.1.24 that I ran into while moving
some of my JVM projects over to Pants. I had to update to pre-release
versionse of 2.1.25 to get around those errors. Coursier went a very,
very long time without a full release with the fix which was frustrating
and the reasons were unclear. Regardless, they've dropped three releases
over the past couple of months. This PR upgrades Pants to use the most
recent one by default.

The newer Coursier versions introduced some minor breaking changes
around filenames, but the code in this PR should support both the old
and new patterns so that users who run into unforeseen issues can just
update pants.toml to point to whatever version of Coursier previously
worked for them so they're not stuck on 2.1.27 if they can't use it for
some reason.

I used Claude Code to write all of the code for this PR and it wrote the
remainder of this PR summary:

Fixes #22909.

## What this does

Bumps the default `[coursier].version` from `v2.1.24` to
[`v2.1.27`](https://github.com/coursier/coursier/releases/tag/v2.1.27).
All older `default_known_versions` entries are kept, so
`[coursier].version = "v2.1.24"` remains a one-line rollback.

Coursier 2.1.27 is not a drop-in replacement. Three things on the Pants
side had to change, and each of them also works with 2.1.24:

1. **JDK ids.** 2.1.27 defaults to a new per-platform JVM index whose
versions have no legacy `1.` prefix. `cs java-home --jvm=temurin:1.11`
fails with `JVM temurin:1.11 not found in index`, and `temurin:1.11` is
the default for both `[jvm].jdk` and `[jvm].tool_jdk`. Pants now strips
that prefix before calling Coursier (`normalize_jdk_id` in
`jvm/jdk_rules.py`), the two defaults are written as `temurin:11`, and
the Scala BSP rule that picks the highest JDK normalizes too (otherwise
`temurin:1.17` sorts below `temurin:11`).
2. **Maven `settings.xml` mirrors.** From 2.1.25, a mirror in the user's
`setting... (continued)

69 of 70 new or added lines in 8 files covered. (98.57%)

1347 existing lines in 76 files now uncovered.

94090 of 102686 relevant lines covered (91.63%)

3.43 hits per line

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

98.08
/src/python/pants/backend/javascript/nodejs_project_environment.py


Source Not Available

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