Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/docs/jvm/java-and-scala.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,27 @@ JDKs used by Pants are automatically fetched using [Coursier](https://get-coursi

To override the default on a particular target, you can use the [`jdk=` field](../../reference/targets/java_source.mdx#jdk). It can be useful to use the [`parametrize` builtin](../using-pants/key-concepts/targets-and-build-files.mdx#parametrizing-targets) with the `jdk=` field, particularly to run test targets under multiple JDKs.

To get a list of available JDK versions:

```sh
$ coursier java --available
adoptium:1.11.0.15
adoptium:1.11.0.16
...
```

Please note that JDKs later than 17 are not supported by nailgun
(see [#20603](https://github.com/pantsbuild/pants/issues/20603)), which
must be disabled manually:

```toml title="pants.toml"
[GLOBAL]
process_execution_local_enable_nailgun = false

[jvm]
jdk = "temurin:1.22"
```

#### Scala version

The Scala version to use is configured on a resolve-by-resolve basis (see the "Third-party dependencies" section below) using the [`[scala].version_for_resolve` option](../../reference/subsystems/scala.mdx#version_for_resolve). The default Scala version for your repository will thus be whichever Scala version is configured for the "default" resolve, which is configured by the [`[jvm].default_resolve` option](../../reference/subsystems/jvm#default_resolve).
Expand Down
4 changes: 4 additions & 0 deletions docs/notes/2.29.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Adds a label to `docker_environment` containers so pantsd can cleanup any old, d

### Backends

#### JVM

Document nailgun compatibility issues.

#### Python

The version of [Pex](https://github.com/pex-tool/pex) used by the Python backend has been upgraded to v2.45.2.
Expand Down
8 changes: 7 additions & 1 deletion src/python/pants/option/global_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,13 @@ class BootstrapOptions:
)
process_execution_local_enable_nailgun = BoolOption(
default=DEFAULT_EXECUTION_OPTIONS.process_execution_local_enable_nailgun,
help="Whether or not to use nailgun to run JVM requests that are marked as supporting nailgun.",
help=softwrap(
"""
Whether or not to use nailgun to run JVM requests that are marked as supporting nailgun.
Note that nailgun only works correctly on JDK <= 17 and must be disabled manually for
later versions.
"""
),
advanced=True,
)
process_execution_graceful_shutdown_timeout = IntOption(
Expand Down
Loading