Skip to content

build: use Go 1.26#2246

Draft
Copilot wants to merge 8 commits intomainfrom
copilot/update-go-version-to-1-26
Draft

build: use Go 1.26#2246
Copilot wants to merge 8 commits intomainfrom
copilot/update-go-version-to-1-26

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

  • Update go.mod from go 1.25.0 to go 1.26.0
  • Update Makefile from golang:1.25-trixie to golang:1.26-trixie
  • Update build/docker/lib/golang_base.docker from golang:1.25-trixie to golang:1.26-trixie
  • Update build/docker/build-image.sh Go version reference
  • Update all Dockerfiles in build/docker/ that reference golang:1.25-trixie
  • Update build/docker/templates/intel-gpu-levelzero.Dockerfile.in template
  • Update build/docker/templates/intel-gpu-levelzero.ubi.Dockerfile.in template (CGO_VERSION=1.25CGO_VERSION=1.26)
  • Update build/docker/intel-gpu-levelzero.Dockerfile (generated file)
  • Update build/docker/intel-gpu-levelzero.ubi.Dockerfile (generated file)
  • Bump golangci-lint to v2.9.0 in Makefile and .github/workflows/lib-validate.yaml (required for Go 1.26 support)
  • Fix pkg/topology/topology_test.go:218 — replace %q with %d for integer len() values (Go 1.26 stricter format checking)
  • Remove all= prefix from GCFLAGS and ASMFLAGS in build/docker/lib/default_args.docker and all Dockerfiles — removing all= limits the flags to the package being built, instead of forcing them onto the full dependency graph and Go runtime, which breaks under Go 1.26

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: mythi <1049565+mythi@users.noreply.github.com>
Copilot AI changed the title [WIP] Update repository to use Go 1.26 build: use Go 1.26 Mar 17, 2026
Copilot AI requested a review from mythi March 17, 2026 05:45
@mythi mythi marked this pull request as ready for review March 17, 2026 05:46
@mythi mythi requested review from bart0sh, kad and tkatila as code owners March 17, 2026 05:46
@mythi mythi marked this pull request as draft March 17, 2026 05:46
@mythi
Copy link
Copy Markdown
Contributor

mythi commented Mar 17, 2026

@copilot golangci-lint action and Makefile must be updated to at least v2.9.0 version of golangci-lint: "Error: can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.0)"

Co-authored-by: mythi <1049565+mythi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot golangci-lint action and Makefile must be updated to at least v2.9.0 version of golangci-lint: "Error: can't load config: the Go language version (go1.25) used to build golangci-lint is lower...

Updated golangci-lint from v2.7.2 to v2.9.0 in both Makefile and .github/workflows/lib-validate.yaml in commit 11268e7.

@mythi
Copy link
Copy Markdown
Contributor

mythi commented Mar 17, 2026

@copilot this one also triggers with Go 1.26: Error: pkg/topology/topology_test.go:218:25: (*testing.common).Fatalf format %q has arg len(test.output) of wrong type int

Co-authored-by: mythi <1049565+mythi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot this one also triggers with Go 1.26: Error: pkg/topology/topology_test.go:218:25: (*testing.common).Fatalf format %q has arg len(test.output) of wrong type int

Fixed in commit ee51183 — replaced %q with %d on line 218 since len() returns an int, not a string.

@mythi
Copy link
Copy Markdown
Contributor

mythi commented Mar 17, 2026

@copilot configure golangci-lint to disable prealloc linter

Co-authored-by: mythi <1049565+mythi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot configure golangci-lint to disable prealloc linter

Done in commit 07d32ad — removed prealloc from the enabled linters list in .golangci.yml (since default: none is set, this effectively disables it).

@mythi
Copy link
Copy Markdown
Contributor

mythi commented Mar 17, 2026

@copilot change default_args.docker and all Dockerfiles to:

 ARG GCFLAGS="-spectre=all -N -l"
 ARG ASMFLAGS="-spectre=all"

add a commit message: removing all= limits the flags to the package being built, instead of forcing them onto the full dependency graph and Go runtime, which breaks under Go 1.26

…tead of forcing them onto the full dependency graph and Go runtime, which breaks under Go 1.26

Co-authored-by: mythi <1049565+mythi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot change default_args.docker and all Dockerfiles to:

...

Done in commit 95ffc43 — removed the all= prefix from GCFLAGS and ASMFLAGS in default_args.docker, all generated Dockerfiles, and the levelzero template files.

@mythi mythi marked this pull request as ready for review March 17, 2026 12:12
@mythi mythi marked this pull request as draft March 18, 2026 09:25
@mythi
Copy link
Copy Markdown
Contributor

mythi commented Mar 26, 2026

@copilot merge the latest main to the working branch and enable prealloc back

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 26, 2026

@copilot merge the latest main to the working branch and enable prealloc back

Done in commit 18608c1 — merged latest main (which includes the prealloc code fixes) and re-enabled the prealloc linter in .golangci.yml.

Copilot AI requested a review from mythi March 26, 2026 09:45
@mythi
Copy link
Copy Markdown
Contributor

mythi commented Mar 26, 2026

Remove all= prefix from GCFLAGS and ASMFLAGS in build/docker/lib/default_args.docker and all Dockerfiles — removing all= limits the flags to the package being built

This is a regression in Go 1.26.x. Will wait to see if that gets resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants