• 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/codegen/protobuf/protoc.py
1
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
UNCOV
3
from pants.core.goals.resolves import ExportableTool
×
UNCOV
4
from pants.core.util_rules.external_tool import TemplatedExternalTool
×
UNCOV
5
from pants.engine.platform import Platform
×
UNCOV
6
from pants.engine.unions import UnionRule
×
UNCOV
7
from pants.option.option_types import BoolOption
×
8

9

UNCOV
10
class Protoc(TemplatedExternalTool):
×
UNCOV
11
    options_scope = "protoc"
×
UNCOV
12
    help = "The protocol buffer compiler (https://developers.google.com/protocol-buffers)."
×
13

UNCOV
14
    default_version = "3.20.1"
×
UNCOV
15
    default_known_versions = [
×
16
        "25.2|linux_arm64 |07683afc764e4efa3fa969d5f049fbc2bdfc6b4e7786a0b233413ac0d8753f6b|3071655",
17
        "25.2|linux_x86_64|78ab9c3288919bdaa6cfcec6127a04813cf8a0ce406afa625e48e816abee2878|3105555",
18
        "25.2|macos_arm64 |8822b090c396800c96ac652040917eb3fbc5e542538861aad7c63b8457934b20|2209071",
19
        "25.2|macos_x86_64|5fe89993769616beff1ed77408d1335216379ce7010eee80284a01f9c87c8888|2235343",
20
        "24.4|linux_arm64 |83ac000ff540e242b6a2ff221a3ac88d2d8e55443801b7a28e9697e5f40e8937|2971447",
21
        "24.4|linux_x86_64|5871398dfd6ac954a6adebf41f1ae3a4de915a36a6ab2fd3e8f2c00d45b50dec|3005774",
22
        "24.4|macos_arm64 |d80544480397fe8a05d966fba291cf1233ad0db0ebc24ec72d7bd077d6e7ac59|2088802",
23
        "24.4|macos_x86_64|6c3b6bf4038d733b6d31f1cc4516a656570b5b5aafb966b650f8182afd0b98cf|2121366",
24
        "3.20.1|linux_arm64 |8a5a51876259f934cd2acc2bc59dba0e9a51bd631a5c37a4b9081d6e4dbc7591|1804837",
25
        "3.20.1|linux_x86_64|3a0e900f9556fbcac4c3a913a00d07680f0fdf6b990a341462d822247b265562|1714731",
26
        # 3.20.1|macos_arm64 below is an x86 binary. Needs Rosetta to run on Apple Silicon.
27
        # see https://github.com/protocolbuffers/protobuf/issues/9893
28
        "3.20.1|macos_arm64 |b362acae78542872bb6aac8dba73aaf0dc6e94991b8b0a065d6c3e703fec2a8b|2708249",
29
        "3.20.1|macos_x86_64|b4f36b18202d54d343a66eebc9f8ae60809a2a96cc2d1b378137550bbe4cf33c|2708249",
30
    ]
UNCOV
31
    default_url_template = (
×
32
        "https://github.com/protocolbuffers/protobuf/releases/download/"
33
        "v{version}/protoc-{version}-{platform}.zip"
34
    )
UNCOV
35
    default_url_platform_mapping = {
×
36
        "linux_arm64": "linux-aarch_64",
37
        "linux_x86_64": "linux-x86_64",
38
        "macos_arm64": "osx-aarch_64",
39
        "macos_x86_64": "osx-x86_64",
40
    }
41

UNCOV
42
    dependency_inference = BoolOption(
×
43
        default=True,
44
        help="Infer Protobuf dependencies on other Protobuf files by analyzing import statements.",
45
    )
UNCOV
46
    tailor = BoolOption(
×
47
        default=True,
48
        help="If true, add `protobuf_sources` targets with the `tailor` goal.",
49
        advanced=True,
50
    )
51

UNCOV
52
    def generate_exe(self, plat: Platform) -> str:
×
53
        return "./bin/protoc"
×
54

55

UNCOV
56
def rules():
×
UNCOV
57
    return (UnionRule(ExportableTool, Protoc),)
×
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

© 2025 Coveralls, Inc