Skip to content

Bump Go to 1.26.0#1697

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:bump-go-1.26.0
Feb 12, 2026
Merged

Bump Go to 1.26.0#1697
dgageot merged 1 commit intodocker:mainfrom
dgageot:bump-go-1.26.0

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 11, 2026

No description provided.

@dgageot dgageot force-pushed the bump-go-1.26.0 branch 2 times, most recently from 5d782d1 to 0995d45 Compare February 12, 2026 05:52
Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot dgageot marked this pull request as ready for review February 12, 2026 14:48
@dgageot dgageot requested a review from a team as a code owner February 12, 2026 14:48
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

⚠️ Found 2 critical compilation errors that must be fixed before merging.

The Go 1.26 upgrade looks good overall, but there are invalid uses of the new() builtin. While Go 1.26 enhanced new() to accept non-constant type expressions, it still requires type arguments, not values or function calls.

if cfg.Models[name].ParallelToolCalls == nil {
m := cfg.Models[name]
m.ParallelToolCalls = boolPtr(true)
m.ParallelToolCalls = new(true)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid syntax: new() called with a value instead of a type

The expression new(true) is invalid Go syntax. The new() builtin function requires a type as its argument, but true is a boolean literal/value, not a type. This code will fail to compile with an error like "cannot use true (untyped bool constant) as type in argument to new".

The field ParallelToolCalls is of type *bool, so the correct approach would be:

t := true
m.ParallelToolCalls = &t

Or use a helper function that returns *bool. Even though Go 1.26 enhanced the new() builtin to accept non-constant expressions, those expressions must still be type expressions, not value literals.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahahahah

ToolCall: acp.RequestPermissionToolCall{
ToolCallId: "max_iterations",
Title: acp.Ptr(fmt.Sprintf("Maximum iterations (%d) reached", e.MaxIterations)),
Title: new(fmt.Sprintf("Maximum iterations (%d) reached", e.MaxIterations)),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid syntax: new() called with fmt.Sprintf expression instead of a type

The expression new(fmt.Sprintf("Maximum iterations (%d) reached", e.MaxIterations)) is invalid Go syntax. The new() builtin accepts only a type expression (e.g., new(string)), not a value-producing function call. fmt.Sprintf() returns a string value, not a type. This will fail to compile.

The correct approach would be:

title := fmt.Sprintf("Maximum iterations (%d) reached", e.MaxIterations)
Title: &title,

Or use the acp.Ptr() helper function if available (as seen elsewhere in the codebase):

Title: acp.Ptr(fmt.Sprintf("Maximum iterations (%d) reached", e.MaxIterations)),

Looking at line 753 in the same file, you correctly use &title for string pointers.

@dgageot dgageot merged commit 5556647 into docker:main Feb 12, 2026
11 checks passed
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