x/tools/cmd/stringer: internal error when importing go packages on go1.18 for Linux #51924
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Ubuntu 20.04 LTS (Linux ubhold 5.11.0-46-generic #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux)
NOTE: This works as expected on Mac OS. This only appears to be a problem on Linux and this was working fine before with go1.17.
go env
OutputWhat did you do?
I tried to use
stringer
to auto-generate theStringer
interface for an enum using go1.18 (installed via APT) on Ubuntu 20.04 LTS.Using
go generate
or just runningstringer
on the code below reproduces the error for meIf I remove the "fmt" import and instead just use a print() I get no errors.
What did you expect to see?
I expected to see a file called foo_string.go that implements a String() method for the Foo enum
What did you see instead?
The text was updated successfully, but these errors were encountered: