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: error from 'go mod vendor' missing import stack for unmatched 'go:embed' pattern #49534

thanm opened this issue Nov 11, 2021 · 4 comments


Copy link

@thanm thanm commented Nov 11, 2021

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

$ go version
go version devel go1.18-73a4bbb0df Thu Nov 11 17:18:13 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

I tried 1.17 and it seems to have the same problem.

What operating system and processor architecture are you using (go env)?


What did you do?

For this program:

if you download it and run "go mod vendor"

What did you expect to see?

Successful "go" cmd.

What did you see instead?


go mod vendor
go: downloading v1.7.2
go: downloading v0.0.0-20190927153633-4e8777c89be4
go: downloading v1.6.0
go: downloading v0.1.2-0.20210708203834-4928d36fafac
go: downloading v0.0.0-20210514084401-e8d321eab015
go: downloading v1.0.3
go mod vendor: pattern trace_probe/trace.o: no matching files found

Note the last error ("no matching files found"). Exit status is 1.

Copy link

@seankhliao seankhliao commented Nov 11, 2021

the file doesn't exist:

Note: delve appears to have switched ebpf libraries last week which should resolve the issue? go-delve/delve#2771


Copy link

@bcmills bcmills commented Nov 12, 2021

We should still have a clearer diagnostic in this case, though: no matching files found doesn't explain why we were trying to match that pattern in the first place.

(I'm guessing maybe it's from a //go:embed directive, but in that case we really ought to display the import stack up to the file containing the unmatched directive.)


Copy link

@bcmills bcmills commented Nov 12, 2021


@bcmills bcmills changed the title cmd/go: strange error from 'go mod vendor' for program importing delve pkgs cmd/go: error from 'go mod vendor' missing import stack for unmatched 'go:embed' pattern Nov 12, 2021
Copy link
Contributor Author

@thanm thanm commented Nov 12, 2021

OK, that makes more sense now. Especially given that Delve has a top-level makefile ( as opposed to being pure "go build").
Agree that a stack trace or more info would be nice.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants