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

pantsbuild / pants / 23074067894

13 Mar 2026 11:06PM UTC coverage: 64.165% (-28.8%) from 92.932%
23074067894

Pull #23171

github

web-flow
Merge 17d8ea7d8 into f07276df6
Pull Request #23171: Debug reapi test cache misses

42163 of 65710 relevant lines covered (64.17%)

0.99 hits per line

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

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

4
from __future__ import annotations
1✔
5

6
from pants.backend.scala.util_rules.versions import ScalaVersion
1✔
7
from pants.option.option_types import BoolOption, DictOption
1✔
8
from pants.option.subsystem import Subsystem
1✔
9
from pants.util.strutil import softwrap
1✔
10

11
DEFAULT_SCALA_VERSION = ScalaVersion.parse("2.13.6")
1✔
12

13

14
class ScalaSubsystem(Subsystem):
1✔
15
    options_scope = "scala"
1✔
16
    help = "Scala programming language"
1✔
17

18
    _version_for_resolve = DictOption[str](
1✔
19
        help=softwrap(
20
            """
21
            A dictionary mapping the name of a resolve to the Scala version to use for all Scala
22
            targets consuming that resolve.
23

24
            All Scala-compiled jars on a resolve\'s classpath must be "compatible" with one another and
25
            with all Scala-compiled first-party sources from `scala_sources` (and other Scala target types)
26
            using that resolve. The option sets the Scala version that will be used to compile all
27
            first-party sources using the resolve. This ensures that the compatibility property is
28
            maintained for a resolve. To support multiple Scala versions, use multiple resolves.
29
            """
30
        ),
31
    )
32
    tailor_source_targets = BoolOption(
1✔
33
        default=True,
34
        help=softwrap(
35
            """
36
            If true, add `scala_sources`, `scala_junit_tests`, and `scalatest_tests` targets with
37
            the `tailor` goal."""
38
        ),
39
        advanced=True,
40
    )
41

42
    def version_for_resolve(self, resolve: str) -> ScalaVersion:
1✔
43
        version = self._version_for_resolve.get(resolve)
1✔
44
        if version:
1✔
45
            return ScalaVersion.parse(version)
×
46
        return DEFAULT_SCALA_VERSION
1✔
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