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

pantsbuild / pants / 19015773527

02 Nov 2025 05:33PM UTC coverage: 17.872% (-62.4%) from 80.3%
19015773527

Pull #22816

github

web-flow
Merge a12d75757 into 6c024e162
Pull Request #22816: Update Pants internal Python to 3.14

4 of 5 new or added lines in 3 files covered. (80.0%)

28452 existing lines in 683 files now uncovered.

9831 of 55007 relevant lines covered (17.87%)

0.18 hits per line

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

0.0
/src/python/pants/jvm/subsystems.py
1
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
from pants.option.option_types import BoolOption, DictOption, IntOption, StrListOption, StrOption
×
UNCOV
7
from pants.option.subsystem import Subsystem
×
UNCOV
8
from pants.util.strutil import help_text, softwrap
×
9

10

UNCOV
11
class JvmSubsystem(Subsystem):
×
UNCOV
12
    options_scope = "jvm"
×
UNCOV
13
    help = help_text(
×
14
        """
15
        Options for general JVM functionality.
16

17
        JDK strings will be passed directly to Coursier's `--jvm` parameter.
18
        Run `cs java --available` to see a list of available JVM versions on your platform.
19

20
        If the string `'system'` is passed, Coursier's `--system-jvm` option will be used
21
        instead, but note that this can lead to inconsistent behavior since the JVM version
22
        will be whatever happens to be found first on the system's PATH.
23
        """
24
    )
25

UNCOV
26
    class EnvironmentAware:
×
UNCOV
27
        global_options = StrListOption(
×
28
            help=softwrap(
29
                """
30
                List of JVM options to pass to all JVM processes.
31

32
                Options set here will be used by any JVM processes required by Pants, with
33
                the exception of heap memory settings like `-Xmx`, which need to be set
34
                using `[GLOBAL].process_total_child_memory_usage` and `[GLOBAL].process_per_child_memory_usage`.
35
                """
36
            ),
37
            advanced=True,
38
        )
39

UNCOV
40
    tool_jdk = StrOption(
×
41
        default="temurin:1.11",
42
        help=softwrap(
43
            """
44
            The JDK to use when building and running Pants' internal JVM support code and other
45
            non-compiler tools. See `jvm` help for supported values.
46
            """
47
        ),
48
        advanced=True,
49
    )
UNCOV
50
    jdk = StrOption(
×
51
        default="temurin:1.11",
52
        help=softwrap(
53
            """
54
            The JDK to use.
55

56
            This string will be passed directly to Coursier's `--jvm` parameter.
57
            Run `cs java --available` to see a list of available JVM versions on your platform.
58

59
            If the string `'system'` is passed, Coursier's `--system-jvm` option will be used
60
            instead, but note that this can lead to inconsistent behavior since the JVM version
61
            will be whatever happens to be found first on the system's PATH.
62
            """
63
        ),
64
        advanced=True,
65
    )
UNCOV
66
    resolves = DictOption(
×
67
        default={"jvm-default": "3rdparty/jvm/default.lock"},
68
        # TODO: expand help message
69
        help="A dictionary mapping resolve names to the path of their lockfile.",
70
    )
UNCOV
71
    default_resolve = StrOption(
×
72
        default="jvm-default",
73
        help=softwrap(
74
            """
75
            The default value used for the `resolve` and `compatible_resolves` fields.
76

77
            The name must be defined as a resolve in `[jvm].resolves`.
78
            """
79
        ),
80
    )
UNCOV
81
    debug_args = StrListOption(
×
82
        help=softwrap(
83
            """
84
            Extra JVM arguments to use when running tests in debug mode.
85

86
            For example, if you want to attach a remote debugger, use something like
87
            `['-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005']`.
88
            """
89
        ),
90
    )
UNCOV
91
    reproducible_jars = BoolOption(
×
92
        default=False,
93
        help=softwrap(
94
            """
95
            When enabled, JAR files produced by JVM tools will have timestamps stripped.
96

97
            Because some compilers do not support this step as a native operation, it can have a
98
            performance cost, and is not enabled by default.
99
            """
100
        ),
101
        advanced=True,
102
    )
UNCOV
103
    deploy_jar_exclude_files = StrListOption(
×
104
        default=[
105
            # Signature files.
106
            r"^META-INF/[^/]+\.SF$",
107
            r"^META-INF/[^/]+\.DSA$",
108
            r"^META-INF/[^/]+\.RSA$",
109
            # interferes with Class-Path: see man jar for i option.
110
            "META-INF/INDEX.LIST$",
111
        ],
112
        help=softwrap(
113
            """
114
            A list of patterns to exclude from all deploy jars.
115
            An individual deploy_jar target can also exclude other files, in addition to these,
116
            by setting its `exclude_files` field.
117
            """
118
        ),
119
    )
120

121
    # See https://github.com/pantsbuild/pants/issues/14937 for discussion of one way to improve
122
    # our behavior around cancellation with nailgun.
UNCOV
123
    nailgun_remote_cache_speculation_delay = IntOption(
×
124
        default=1000,
125
        help=softwrap(
126
            """
127
            The time in milliseconds to delay speculation of nailgun processes while reading
128
            from the remote cache.
129

130
            When speculating, a remote cache hit will cancel the local copy of a process. But
131
            because nailgun does not natively support cancellation, that requires killing a
132
            nailgun server, which will mean that future processes take longer to warm up.
133

134
            This setting allows for trading off waiting for potentially slow cache entries
135
            against potentially having to warm up a new nailgun server.
136
            """
137
        ),
138
        advanced=True,
139
    )
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

© 2025 Coveralls, Inc