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

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

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

jayconrod opened this issue Dec 8, 2020 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@jayconrod
Copy link
Contributor

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

@jayconrod jayconrod added NeedsFix The path to resolution is known, but the work has not been done. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 labels Dec 8, 2020
@jayconrod jayconrod added this to the Go1.16 milestone Dec 8, 2020
@toothrot toothrot removed the okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 label Dec 17, 2020
@toothrot
Copy link
Contributor

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

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

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

@golang golang locked and limited conversation to collaborators Jan 20, 2022
@rsc rsc unassigned matloob Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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

5 participants