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

pantsbuild / pants / 33814103561
93%

Build:
DEFAULT BRANCH: main
Ran 03 Sep 2026 10:45PM UTC
Jobs 11
Files 1782
Run time 4min
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

03 Sep 2026 10:39PM UTC coverage: 92.895% (+0.001%) from 92.894%
33814103561

push

github

web-flow
Key Go module downloads on `cgo_enabled`, not all of `GoBuildOptions` (#23664)

`ModuleDownloadRequest` carries the whole `GoBuildOptions` in its
memoization key, but downloading and analyzing a module barely depends
on it: `go mod download` never consults build options, and the only
consumer anywhere in `download_and_analyze_module` is
`env={"CGO_ENABLED": ...}` for the package analyzer.

So callers differing only in a field that cannot affect the result each
pay for their own download of every module in the graph. That is not
hypothetical: target generation passes `GoBuildOptions()` defaults to
dodge the rule-graph cycle noted in the TODO in `target_type_rules.py`,
while a compile resolves the real options. A repository building with
`race=True` therefore downloads every third-party module exactly twice
per run.

Measured on a 32-`go_mod` production repo before this change: ~1,979
remote-cache AC lookups for 1,059 distinct modules.

## The change

Narrow the key to `cgo_enabled`. Both `GoBuildOptions.cgo_enabled` and
`[golang].cgo_enabled` default to `True`, so the two keys collapse into
one.

This also fixes the general N-way case — any two callers differing only
in irrelevant options now share one download — which resolving the
rule-graph cycle would not have done, since targets within a module can
legitimately differ in build options.

The TODO is annotated rather than removed: the cycle still exists, it
just no longer costs a duplicate download. Note that
`expand_module_import_paths` (added by #23499) already passes the same
defaults and comments that it matches target generation, so both sites
share the single key.

## Tests

- `test_module_download_key_ignores_build_options_that_cannot_affect_it`
pins the property directly: `race`, `msan`, and compiler/linker flags no
longer split the key, while `cgo_enabled` still does.
- `test_race_detector_does_not_duplicate_module_downloads` is the
end-to-end form — the same module analyzed with and withou... (continued)

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

95578 of 102888 relevant lines covered (92.9%)

3.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_7/10 - 33814103561.1 03 Sep 2026 10:53PM UTC 1219
50.46
GitHub Action Run
2 test_python_linux_x86_64_2/10 - 33814103561.2 03 Sep 2026 10:52PM UTC 1215
58.58
GitHub Action Run
3 test_python_linux_x86_64_6/10 - 33814103561.3 03 Sep 2026 10:50PM UTC 1212
50.05
GitHub Action Run
4 test_python_linux_x86_64_0/10 - 33814103561.4 03 Sep 2026 10:51PM UTC 1236
57.46
GitHub Action Run
5 test_python_linux_x86_64_1/10 - 33814103561.5 03 Sep 2026 10:53PM UTC 1215
48.87
GitHub Action Run
6 test_python_linux_x86_64_3/10 - 33814103561.6 03 Sep 2026 10:51PM UTC 1213
52.35
GitHub Action Run
7 test_python_linux_x86_64_4/10 - 33814103561.7 03 Sep 2026 10:55PM UTC 1245
59.04
GitHub Action Run
8 test_python_linux_x86_64_8/10 - 33814103561.8 03 Sep 2026 10:54PM UTC 1214
52.73
GitHub Action Run
9 test_python_linux_x86_64_9/10 - 33814103561.9 03 Sep 2026 10:51PM UTC 1225
53.97
GitHub Action Run
10 test_python_linux_x86_64_5/10 - 33814103561.10 03 Sep 2026 10:51PM UTC 1230
60.27
GitHub Action Run
11 test_python_linux_arm64 - 33814103561.11 03 Sep 2026 10:45PM UTC 1196
52.67
GitHub Action Run
Source Files on build 33814103561
  • Tree
  • List 1782
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33814103561
  • f0c78046 on github
  • Prev Build on main (#33814013709)
  • Next Build on main (#33814013709)
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