Skip to content
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

cmd/go: go list -export fails with build system did not supply embed configuration #58885

Closed
dominikh opened this issue Mar 6, 2023 · 2 comments
Assignees
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@dominikh
Copy link
Member

dominikh commented Mar 6, 2023

What version of Go are you using (go version)?

$ go version
go version devel go1.21-c0ac33c006 Thu Feb 23 15:24:16 2023 +0000 linux/amd64

Does this issue reproduce with the latest release?

No

What did you do?

$ go list -json="Export" -export=true crypto/internal/nistec

What did you expect to see?

{
	"Export": "/home/dominikh/.cache/go-build/87/87ca46f4197e1a35c09440c07ea6b3ff726c42cfaecd61820cc34c33544d59b7-d",
}

What did you see instead?

# crypto/internal/nistec
src/crypto/internal/nistec/p256_asm.go:322:3: invalid go:embed: build system did not supply embed configuration
{}

This is caused by c0ac33c which skips the computation of embed-related data when -json specifies a list of fields that doesn't include any embed-related fields. However, this fails to account for -export, which has to compile code, which needs a valid embed configuration.

/cc @fviernau

@cagedmantis cagedmantis added this to the Backlog milestone Mar 6, 2023
@cagedmantis cagedmantis added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Mar 6, 2023
@cagedmantis
Copy link
Contributor

cc @bcmills @matloob

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 6, 2023
@bcmills bcmills modified the milestones: Backlog, Go1.21 Mar 6, 2023
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 6, 2023
@bcmills bcmills changed the title cmd/go: invalid go:embed: build system did not supply embed configuration cmd/go: go list -export fails with build system did not supply embed configuration Mar 6, 2023
@bcmills bcmills self-assigned this Mar 6, 2023
@gopherbot
Copy link

Change https://go.dev/cl/477197 mentions this issue: cmd/go: compute BuildInfo and EmbedFiles when listing export data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants