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

pantsbuild / pants / 23838324561

01 Apr 2026 07:59AM UTC coverage: 60.966% (-31.9%) from 92.907%
23838324561

Pull #23204

github

web-flow
Merge fd6066932 into 0c78ceb96
Pull Request #23204: Port ScalarField, AsyncFieldMixin and friends to rust

8 of 12 new or added lines in 2 files covered. (66.67%)

19216 existing lines in 560 files now uncovered.

39119 of 64165 relevant lines covered (60.97%)

0.96 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)
1✔
UNCOV
46
        return DEFAULT_SCALA_VERSION
×
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