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

pantsbuild / pants / 32350408746
93%

Build:
DEFAULT BRANCH: main
Ran 20 Aug 2026 08:54AM UTC
Jobs 11
Files 1782
Run time 5min
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

20 Aug 2026 08:45AM UTC coverage: 92.894% (+0.004%) from 92.89%
32350408746

push

github

web-flow
fix(golang): record a build ID when linking Go binaries (#23632)

## Problem

The Go backend doesn't pass a -buildid to `go tool link`. It does for
`go tool compile`. Also go build effectively always provides one, it's
conditional only on having the build cache enabled which is mandatory
since 1.12.

This is causing some problems on macOS, as when go internally links, it
only emits LC_UUID if there is a buildid (on 1.24+). The dyld loader on
macOS started enforcing executables to have a LC_UUID for binaries built
for SDK/OS 26. Without one on a binary built for that SDK version it
cannot be executed on macOS 26.

This is somewhat narrow, as a pure go binary emits a hard coded SDK
version 12, which is exempt from the enforcement. And when building with
CGO the SDK version is the hosts (so can be in play), but if it's
externally linked it gets an LC_UUID from that linker instead. When it
does happen is when building a binary where the closure includes only
internal CGO dependencies that are allowlisted by Go to be linked
internally. This includes `runtime/cgo` and when using `race=True`. A
binary built by pants in that case is not runnable on macOS 26.

An example case that this hits is depending on `testcontainers-go`,
which depends on `ebitengine/purego`, which pulls in only `runtime/cgo`.
This ends up on the path with an internal linker not emitting LC_UUID
but emitting an SDK stamp of the host system that is affected by the
enforcement. Running that binary fails with `dyld[317]: missing LC_UUID
load command`.

Also more cosmetically it is a divergence from `go build` to omit a
buildid, which some go tooling otherwise can use.

Worth noting is that Go does [fix the missing LC_UUID in some unreleased
version](https://go-review.googlesource.com/c/go/+/751260/4/src/cmd/link/internal/ld/macho.go#854-860).
But I think this fix is still valid since `go build` does provide a
buildid to link still, and it also fixes the unpatched versions of Go.

## Fix

Pro... (continued)

66 of 67 new or added lines in 2 files covered. (98.51%)

95481 of 102785 relevant lines covered (92.89%)

3.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
98.82
-1.18% src/python/pants/backend/go/util_rules/link.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_4/10 - 32350408746.1 20 Aug 2026 08:59AM UTC 1245
58.77
GitHub Action Run
2 test_python_linux_x86_64_8/10 - 32350408746.2 20 Aug 2026 08:58AM UTC 1214
52.72
GitHub Action Run
3 test_python_linux_x86_64_5/10 - 32350408746.3 20 Aug 2026 08:55AM UTC 1230
60.24
GitHub Action Run
4 test_python_linux_x86_64_6/10 - 32350408746.4 20 Aug 2026 08:54AM UTC 1212
50.05
GitHub Action Run
5 test_python_linux_x86_64_0/10 - 32350408746.5 20 Aug 2026 08:55AM UTC 1236
57.48
GitHub Action Run
6 test_python_linux_x86_64_2/10 - 32350408746.6 20 Aug 2026 08:56AM UTC 1215
58.6
GitHub Action Run
7 test_python_linux_arm64 - 32350408746.7 20 Aug 2026 08:54AM UTC 1196
52.68
GitHub Action Run
8 test_python_linux_x86_64_7/10 - 32350408746.8 20 Aug 2026 08:56AM UTC 1219
50.49
GitHub Action Run
9 test_python_linux_x86_64_3/10 - 32350408746.9 20 Aug 2026 08:55AM UTC 1213
52.37
GitHub Action Run
10 test_python_linux_x86_64_9/10 - 32350408746.10 20 Aug 2026 08:55AM UTC 1225
53.98
GitHub Action Run
11 test_python_linux_x86_64_1/10 - 32350408746.11 20 Aug 2026 08:57AM UTC 1215
48.88
GitHub Action Run
Source Files on build 32350408746
  • Tree
  • List 1782
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32350408746
  • 5a326a88 on github
  • Prev Build on main (#32330306156)
  • Next Build on main (#32491967248)
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