x/tools/internal/imports: import embed in files containing go:embed directives #50414
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Gopls version info:
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
gopls via x/tools/internal/imports should add an
import _ "embed"
, because the file requires it for the package to build.What did you see instead?
No import added. The package fails to compile when running
go test
because./manual_test.go:8:3: go:embed only allowed in Go files that import "embed"
.@gopherbot Please add label FeatureRequest
The text was updated successfully, but these errors were encountered: