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

pantsbuild / pants / 23173035367

17 Mar 2026 12:47AM UTC coverage: 91.371% (-1.6%) from 92.933%
23173035367

push

github

web-flow
update helm (and friends) to a recent 3.x seies (#23143)

v4 is a major breaking change, so holding off on that. (There was also
just a 3.20, but 3.19 has this reassuring series of bug fixes and was
also quite recent.)

2 of 2 new or added lines in 2 files covered. (100.0%)

1263 existing lines in 73 files now uncovered.

86196 of 94336 relevant lines covered (91.37%)

3.87 hits per line

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

90.32
/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

4
from __future__ import annotations
3✔
5

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

19

20
class SdkImplicitLinkerDependenciesHook(ImplicitLinkerDependenciesHook):
3✔
21
    pass
3✔
22

23

24
@rule
3✔
25
async def provide_sdk_implicit_linker_dependencies(
3✔
26
    request: SdkImplicitLinkerDependenciesHook,
27
) -> ImplicitLinkerDependencies:
28
    # Build implicit linker deps.
29
    # All binaries link to `runtime`.
30
    implicit_deps_import_paths: set[str] = {"runtime"}
3✔
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:
3✔
UNCOV
34
        implicit_deps_import_paths.add("runtime/race")
×
35
    if request.build_opts.with_msan:
3✔
36
        implicit_deps_import_paths.add("runtime/msan")
×
37
    if request.build_opts.with_asan:
3✔
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(
3✔
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 = []
3✔
53
    import_paths_to_pkg_a_files: dict[str, str] = {}
3✔
54
    for built_implicit_linker_dep in built_implicit_linker_deps:
3✔
55
        import_paths_to_pkg_a_files.update(built_implicit_linker_dep.import_paths_to_pkg_a_files)
3✔
56
        implicit_dep_digests.append(built_implicit_linker_dep.digest)
3✔
57

58
    digest = await merge_digests(MergeDigests(implicit_dep_digests))
3✔
59

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

65

66
def rules():
3✔
67
    return (
3✔
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