• 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/backend/go/util_rules/cgo_binaries.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
UNCOV
3
from __future__ import annotations
×
4

UNCOV
5
from dataclasses import dataclass
×
6

UNCOV
7
from pants.backend.go.subsystems.golang import GolangSubsystem
×
UNCOV
8
from pants.core.util_rules.system_binaries import (
×
9
    BinaryPath,
10
    BinaryPathRequest,
11
    BinaryPathTest,
12
    find_binary,
13
)
UNCOV
14
from pants.engine.engine_aware import EngineAwareParameter
×
UNCOV
15
from pants.engine.rules import collect_rules, implicitly, rule
×
16

17

UNCOV
18
@dataclass(frozen=True)
×
UNCOV
19
class CGoBinaryPathRequest(EngineAwareParameter):
×
UNCOV
20
    binary_name: str
×
UNCOV
21
    binary_path_test: BinaryPathTest | None
×
22

UNCOV
23
    def debug_hint(self) -> str | None:
×
24
        return self.binary_name
×
25

26

UNCOV
27
@rule
×
UNCOV
28
async def find_cgo_binary_path(
×
29
    request: CGoBinaryPathRequest, golang_env_aware: GolangSubsystem.EnvironmentAware
30
) -> BinaryPath:
31
    path_request = BinaryPathRequest(
×
32
        binary_name=request.binary_name,
33
        search_path=golang_env_aware.cgo_tool_search_paths,
34
        test=request.binary_path_test,
35
    )
36
    paths = await find_binary(path_request, **implicitly())
×
37
    first_path = paths.first_path_or_raise(
×
38
        path_request, rationale=f"find the `{request.binary_name}` tool required by CGo"
39
    )
40
    return first_path
×
41

42

UNCOV
43
def rules():
×
UNCOV
44
    return collect_rules()
×
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