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 mod vendor should copy files matched by //go:embed #43077

Open
jayconrod opened this issue Dec 8, 2020 · 3 comments
Open

cmd/go: go mod vendor should copy files matched by //go:embed #43077

jayconrod opened this issue Dec 8, 2020 · 3 comments
Assignees
Milestone

Comments

@jayconrod
Copy link
Contributor

@jayconrod jayconrod commented Dec 8, 2020

What did you do?

In a package outside the main module (example.com/p), embed some files in a subdirectory sub using a //go:embed directive.

From the main module, import example.com/p.

Run go mod vendor.

What did you expect to see?

The embedded files are present in vendor/example.com/p/sub. Other files from that directory are not vendored.

What did you see instead?

vendor/example.com/p/sub is not present.

cc @bcmills @matloob @rsc

@toothrot
Copy link
Contributor

@toothrot toothrot commented Jan 7, 2021

Any update on this as a Go 1.16 release blocker?

@matloob matloob self-assigned this Jan 7, 2021
@jayconrod
Copy link
Contributor Author

@jayconrod jayconrod commented Jan 7, 2021

This should still be a release blocker.

Ideally, we should report an error if there ends up being conflict or overlap between different vendored packages. There are a few known issues with that (#38571, #38342, #42970), and I don't think it's essential to solve that for 1.17.

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 14, 2021

Change https://golang.org/cl/283641 mentions this issue: cmd/go: have go mod vendor copy embedded files in subdirs

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.