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

Go: improve UX of embed and resources #13795

Open
Eric-Arellano opened this issue Dec 3, 2021 · 1 comment
Open

Go: improve UX of embed and resources #13795

Eric-Arellano opened this issue Dec 3, 2021 · 1 comment
Labels
backend: Go Go backend-related issues enhancement

Comments

@Eric-Arellano
Copy link
Contributor

To properly use embed, you must create a resources target and add it to the dependencies of your target. Can we make this more ergonomic? Like with #13784, we may want to:

  1. Use tailor to create resources targets based on the embed patterns.
  2. Add dependency inference.

Also, for now, a resource will only be added to the package if it has a corresponding embed directive. It's not enough to just add the resource target to the go_package. We think that is likely acceptable to avoid magic and make sure that if something builds with Pants, it still builds with standard Go tooling. But, we should probably detect this case and error.

@tdyas tdyas added the backend: Go Go backend-related issues label Jan 26, 2022
@Eric-Arellano
Copy link
Contributor Author

Dependency inference should be easier to do now thanks to @thejcannon 's #14049

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Go Go backend-related issues enhancement
Projects
None yet
Development

No branches or pull requests

2 participants