Go version
go version go1.26.3 linux/amd64
Output of go env in your module/workspace:
What did you do?
Upgrade from Go 1.25 to Go 1.26
What did you see happen?
An existing build started failing with:
foobar/core/foobar/protocol/foobar/common: invalid flag in pkg-config: --define-variable=srcdir=/home/tcagent3/opt/teamcity/work/tech-build/foobar/tech/core/foobar/protocol/foobar/common (see https://go.dev/s/invalidflag)
Upon investigation, it seems that the fix for #77387 has resulted in banning safe flag values in pkg-config files, namely those that define variables with values containing dash characters, amongst others.
I am guessing that the regex at
|
re(`--define-variable=[A-Za-z_][A-Za-z0-9_]*=[^@\-]*`), |
was intended to be something slightly different.
The outcome is that I am no longer able to build this (internal) software without ensuring there is no dash character anywhere in the absolute pathname containing the build environment, though other users may be impacted in other ways depending on the purpose for which they were using variables.
What did you expect to see?
No regression.
Go version
go version go1.26.3 linux/amd64
Output of
go envin your module/workspace:What did you do?
Upgrade from Go 1.25 to Go 1.26
What did you see happen?
An existing build started failing with:
Upon investigation, it seems that the fix for #77387 has resulted in banning safe flag values in pkg-config files, namely those that define variables with values containing dash characters, amongst others.
I am guessing that the regex at
go/src/cmd/go/internal/work/security.go
Line 262 in 2403e59
The outcome is that I am no longer able to build this (internal) software without ensuring there is no dash character anywhere in the absolute pathname containing the build environment, though other users may be impacted in other ways depending on the purpose for which they were using variables.
What did you expect to see?
No regression.