-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: mod vendor
tries to evaluate go:embed pattern inside _test.go files
#63473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, I misremembered. cc @bcmills |
So, according to the
We should not include embed patterns in test files when vendoring? cc @matloob |
quantonganh
added a commit
to quantonganh/go
that referenced
this issue
Oct 11, 2023
Currently, `go mod vendor` copy all files matched by //go:embed, even when it is in a _test.go file. According to the documentation, it should not include test code for vendored packages. Fixes golang#63473
Change https://go.dev/cl/534495 mentions this issue: |
Change https://go.dev/cl/534376 mentions this issue: |
yunginnanet
pushed a commit
to yunginnanet/go
that referenced
this issue
Oct 20, 2023
Currently, go mod vendor copy all files matched by //go:embed, even when it is in a _test.go file. According to the documentation, it should not include test code for vendored packages. Fixes golang#63473 Change-Id: I28c411724fc7b7aeb683857fc114e20b08635e01 Reviewed-on: https://go-review.googlesource.com/c/go/+/534376 Auto-Submit: Cuong Manh Le <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I don't know.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go:embed
directives inside a_test.go
file.For example, https://github.com/emiago/sipgo/blob/main/server_integration_test.go#L26 contains
go:embed
directives that will not satisfied.go mod vendor
:What did you expect to see?
go mod vendor
completes normallyWhat did you see instead?
The text was updated successfully, but these errors were encountered: