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

pantsbuild / pants / 37997622094
93%

Build:
DEFAULT BRANCH: main
Ran 09 Oct 2026 10:14PM UTC
Jobs 11
Files 1785
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Oct 2026 10:09PM UTC coverage: 92.932% (+0.006%) from 92.926%
37997622094

push

github

web-flow
Add `[golang].third_party_target_generation = imported` (closes #20340) (#23665)

## Background

Closes #20340. Implements the design @rdeknijf proposed and @benjyw
approved there; the design is theirs, this is our implementation of it,
opened with their go-ahead.

Adds `[golang].third_party_target_generation` = `build-list` (default,
today's behavior) | `imported`. Under `imported`,
`go_third_party_package` targets are generated only for third-party
packages reachable through the import graph from first-party code, so
target generation stops downloading and analyzing modules nothing
imports.

#23499's `third_party_target_granularity = module` does not cover this:
`generate_targets_from_go_mod` calls
`download_and_analyze_third_party_packages` unconditionally, and the
granularity branch selects from the already-resolved result. The two
compose — import scoping decides *which* modules are resolved,
granularity decides how many targets each produces.

Four parts: constraint-free `AllImports`/`AllTestImports` on the package
analyzer (so build-tag-gated, other-platform and `tools.go` imports
still resolve); a first-party root scan; a fixpoint walk downloading
only reached modules; and a codegen roots union with Protobuf
registered, so generated `.pb.go` imports still get targets.

The root scan reads `.go` files from the filesystem rather than
resolving targets. That is forced: its only caller is a target
generator, so touching the target graph deadlocks the engine with `The
dependency graph contained a cycle`. It is easy to miss, because
injecting `AllTargets` there leaves `pants list` green in this repo —
which has no `go_mod` targets — and only fails once a real one exists.

## Measured

32-`go_mod` production repo, `check src/go/config::` (an 8-module leaf),
fresh local store:

| scenario | build-list | imported |
| -- | -- | -- |
| remote cache off | 420s | 165s |
| remote cache on, warm | 446s | **96s** |

| | build-list | imported |
| -- | -- | -- ... (continued)

228 of 240 new or added lines in 7 files covered. (95.0%)

96260 of 103581 relevant lines covered (92.93%)

3.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
89.55
-0.94% src/python/pants/backend/go/util_rules/third_party_pkg.py
1
93.3
0.55% src/python/pants/backend/codegen/protobuf/go/rules.py
1
98.51
src/python/pants/backend/go/util_rules/import_roots.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_8/10 - 37997622094.1 09 Oct 2026 10:18PM UTC 1215
52.68
GitHub Action Run
2 test_python_linux_x86_64_4/10 - 37997622094.2 09 Oct 2026 10:19PM UTC 1246
58.98
GitHub Action Run
3 test_python_linux_x86_64_9/10 - 37997622094.3 09 Oct 2026 10:15PM UTC 1226
54.0
GitHub Action Run
4 test_python_linux_arm64 - 37997622094.4 09 Oct 2026 10:15PM UTC 1197
52.62
GitHub Action Run
5 test_python_linux_x86_64_5/10 - 37997622094.5 09 Oct 2026 10:15PM UTC 1232
60.36
GitHub Action Run
6 test_python_linux_x86_64_7/10 - 37997622094.6 09 Oct 2026 10:17PM UTC 1220
50.75
GitHub Action Run
7 test_python_linux_x86_64_1/10 - 37997622094.7 09 Oct 2026 10:17PM UTC 1216
48.84
GitHub Action Run
8 test_python_linux_x86_64_0/10 - 37997622094.8 09 Oct 2026 10:15PM UTC 1237
57.41
GitHub Action Run
9 test_python_linux_x86_64_6/10 - 37997622094.9 09 Oct 2026 10:14PM UTC 1213
50.12
GitHub Action Run
10 test_python_linux_x86_64_2/10 - 37997622094.10 09 Oct 2026 10:15PM UTC 1216
58.53
GitHub Action Run
11 test_python_linux_x86_64_3/10 - 37997622094.11 09 Oct 2026 10:15PM UTC 1215
52.32
GitHub Action Run
Source Files on build 37997622094
  • Tree
  • List 1785
  • Changed 10
  • Source Changed 10
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37997622094
  • 5ec37d43 on github
  • Prev Build on main (#37886396196)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc