Skip to content

fix(ci): fix Go stdlib R2 upload workflow (GOROOT capture + build tag conflict)#559

Merged
shivasurya merged 4 commits intomainfrom
fix/go-stdlib-r2-goroot-capture
Feb 25, 2026
Merged

fix(ci): fix Go stdlib R2 upload workflow (GOROOT capture + build tag conflict)#559
shivasurya merged 4 commits intomainfrom
fix/go-stdlib-r2-goroot-capture

Conversation

@shivasurya
Copy link
Owner

@shivasurya shivasurya commented Feb 25, 2026

Summary

  • `$GOROOT` is not exported to the shell by `actions/setup-go` — only `go` is added to `PATH`
  • All 9 "Save Go X.XX GOROOT" steps captured an empty string, causing every version to be skipped with `Warning: GOROOT_1_XX is not set`
  • Fix: replace `$GOROOT` with `$(go env GOROOT)` which queries the active Go binary on PATH

Test plan

  • Push trigger added on `fix/go-stdlib-r2-goroot-capture` branch — workflow runs on this PR branch directly without needing to merge
  • Verify "Verify Go installations" step shows all `GOROOT_1_XX` populated (not ``)
  • Verify registries upload to R2 at `assets.codepathfinder.dev/registries/go{version}/stdlib/v1/manifest.json`

🤖 Generated with Claude Code

\$GOROOT is not exported to the shell environment by actions/setup-go —
only the go binary is added to PATH. Using \`go env GOROOT\` correctly
queries the active Go installation's root directory, so all GOROOT_1_XX
variables are now captured and the upload script no longer skips every
version.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@shivasurya shivasurya self-assigned this Feb 25, 2026
@safedep
Copy link

safedep bot commented Feb 25, 2026

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

@github-actions
Copy link

github-actions bot commented Feb 25, 2026

Code Pathfinder Security Scan

Pass Critical High Medium Low Info

No security issues detected.

Metric Value
Files Scanned 3
Rules 38

Powered by Code Pathfinder

Adds a push trigger scoped to fix/go-stdlib-r2-goroot-capture so the
upload workflow can be validated directly on this branch without
needing to merge to main first.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@shivasurya shivasurya added the bug Something isn't working label Feb 25, 2026
@shivasurya shivasurya changed the title fix(ci): use go env GOROOT instead of $GOROOT in stdlib upload workflow fix(ci): use go env GOROOT instead of $GOROOT in Go stdlib R2 upload workflow Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.32%. Comparing base (b28db49) to head (248d6bd).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #559   +/-   ##
=======================================
  Coverage   83.32%   83.32%           
=======================================
  Files         143      143           
  Lines       17782    17782           
=======================================
  Hits        14817    14817           
  Misses       2426     2426           
  Partials      539      539           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…dlib conflict

Using -tags ignore with go run accidentally satisfies //go:build ignore
constraints on Go stdlib generator files (gen_cooked.go, pow10gen.go, etc.),
causing 'found packages X and main' and import cycle errors during compilation.

Replace the build tag with cpf_generate_stdlib_registry — a project-specific
tag that no stdlib file uses — so go run -tags cpf_generate_stdlib_registry
compiles only our generator without polluting the stdlib package graph.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@shivasurya shivasurya changed the title fix(ci): use go env GOROOT instead of $GOROOT in Go stdlib R2 upload workflow fix(ci): fix Go stdlib R2 upload workflow (GOROOT capture + build tag conflict) Feb 25, 2026
Now matches stdlib-r2-upload.yml (Python): only runs on release
publish or manual workflow_dispatch, not on branch pushes.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@shivasurya shivasurya merged commit 376e4dd into main Feb 25, 2026
5 checks passed
@shivasurya shivasurya deleted the fix/go-stdlib-r2-goroot-capture branch February 25, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant