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

pantsbuild / pants / 21552830208

31 Jan 2026 11:40PM UTC coverage: 80.277% (-0.05%) from 80.324%
21552830208

Pull #23062

github

web-flow
Merge 808a9786c into 2c4dcf9cf
Pull Request #23062: Remove support for Get

18 of 25 new or added lines in 4 files covered. (72.0%)

17119 existing lines in 541 files now uncovered.

78278 of 97510 relevant lines covered (80.28%)

3.36 hits per line

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

51.61
/src/python/pants/backend/go/util_rules/implicit_linker_deps.py
1
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
4✔
5

UNCOV
6
from pants.backend.go.util_rules.build_pkg import required_built_go_package
4✔
UNCOV
7
from pants.backend.go.util_rules.build_pkg_target import BuildGoPackageRequestForStdlibRequest
4✔
UNCOV
8
from pants.backend.go.util_rules.link_defs import (
4✔
9
    ImplicitLinkerDependencies,
10
    ImplicitLinkerDependenciesHook,
11
)
UNCOV
12
from pants.engine.internals.native_engine import MergeDigests
4✔
UNCOV
13
from pants.engine.internals.selectors import concurrently
4✔
UNCOV
14
from pants.engine.intrinsics import merge_digests
4✔
UNCOV
15
from pants.engine.rules import collect_rules, implicitly, rule
4✔
UNCOV
16
from pants.engine.unions import UnionRule
4✔
UNCOV
17
from pants.util.frozendict import FrozenDict
4✔
18

19

UNCOV
20
class SdkImplicitLinkerDependenciesHook(ImplicitLinkerDependenciesHook):
4✔
UNCOV
21
    pass
4✔
22

23

UNCOV
24
@rule
4✔
UNCOV
25
async def provide_sdk_implicit_linker_dependencies(
4✔
26
    request: SdkImplicitLinkerDependenciesHook,
27
) -> ImplicitLinkerDependencies:
28
    # Build implicit linker deps.
29
    # All binaries link to `runtime`.
30
    implicit_deps_import_paths: set[str] = {"runtime"}
×
31
    # TODO: External linking mode forces an import of runtime/cgo.
32
    # TODO: On ARM with GOARM=5, it forces an import of math, for soft floating point.
33
    if request.build_opts.with_race_detector:
×
34
        implicit_deps_import_paths.add("runtime/race")
×
35
    if request.build_opts.with_msan:
×
36
        implicit_deps_import_paths.add("runtime/msan")
×
37
    if request.build_opts.with_asan:
×
38
        implicit_deps_import_paths.add("runtime/asan")
×
39
    # TODO: Building for coverage in Go 1.20+ forces an import of runtime/coverage.
40

41
    built_implicit_linker_deps = await concurrently(
×
42
        required_built_go_package(
43
            **implicitly(
44
                BuildGoPackageRequestForStdlibRequest(
45
                    dep_import_path, build_opts=request.build_opts
46
                )
47
            ),
48
        )
49
        for dep_import_path in implicit_deps_import_paths
50
    )
51

52
    implicit_dep_digests = []
×
53
    import_paths_to_pkg_a_files: dict[str, str] = {}
×
54
    for built_implicit_linker_dep in built_implicit_linker_deps:
×
55
        import_paths_to_pkg_a_files.update(built_implicit_linker_dep.import_paths_to_pkg_a_files)
×
56
        implicit_dep_digests.append(built_implicit_linker_dep.digest)
×
57

58
    digest = await merge_digests(MergeDigests(implicit_dep_digests))
×
59

60
    return ImplicitLinkerDependencies(
×
61
        digest=digest,
62
        import_paths_to_pkg_a_files=FrozenDict(import_paths_to_pkg_a_files),
63
    )
64

65

UNCOV
66
def rules():
4✔
UNCOV
67
    return (
4✔
68
        *collect_rules(),
69
        UnionRule(ImplicitLinkerDependenciesHook, SdkImplicitLinkerDependenciesHook),
70
    )
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