You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per conversation here: #25922 (comment)
it seems like managing tools dependencies with tools.go is still a best practice
The behavior of go list changed in 1.21, seems like in this commit by @matloob: a5c7928
and it is now failing with "is a program, not an importable package", error. See below:
What version of Go are you using (go version)?
$ go version
go version devel go1.21-a5c79283f7 Mon Apr 10 20:27:52 2023 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes, reproducible on 1.21
What operating system and processor architecture are you using (go env)?
$ go list -f '{{join .Imports " "}}' tools.go
tools.go:17:2: import "github.com/envoyproxy/protoc-gen-validate" is a program, not an importable package
Running with -e flag
go list -e -f '{{join .Imports " "}}' tools.go
Does produce expected list of packages, but I am not sure if this is a right thing to do here.
The text was updated successfully, but these errors were encountered:
Per conversation here:
#25922 (comment)
it seems like managing tools dependencies with
tools.go
is still a best practiceThe behavior of go list changed in 1.21, seems like in this commit by @matloob:
a5c7928
and it is now failing with "is a program, not an importable package", error. See below:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, reproducible on 1.21
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Previous versions produced a list, that can be used by
go install
:What did you see instead?
Now it gives an error:
Running with
-e
flagDoes produce expected list of packages, but I am not sure if this is a right thing to do here.
The text was updated successfully, but these errors were encountered: