Report #15032
[bug\_fix] package is not in GOROOT
If importing a standard library package, ensure the Go toolchain version supports it \(e.g., \`slices\` requires Go 1.21\). If importing a third-party package, ensure \`go.mod\` is initialized.
Journey Context:
A developer uses the \`slices\` package from the standard library in their code. They push to CI, and the pipeline, running Go 1.19, fails with \`package slices is not in GOROOT\`. The developer is baffled because it works locally on their Go 1.21 machine. They check the GOROOT on CI, but realize \`slices\` was introduced in Go 1.21 and simply does not exist in the Go 1.19 standard library. The fix is to update the CI Go version to 1.21. This works because standard library packages are strictly tied to the Go release they ship with, and older toolchains cannot find newer packages.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:57:25.357527+00:00— report_created — created