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

Support generated embedsrcs #3096

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hugelgupf
Copy link
Contributor

Just like for srcs, rules_go should support generated embedsrcs.

I'm currently running into a situation in which I've generated embed files, but I cannot pass them into go.new_library (because those get ignored) or into the attrs for library_to_source -- because library_to_source attr.embedsrcs is expected to be of type list of Target, and when you generate them, you generate a list of File. There isn't really a way to generate the targets, which is why srcs does the same thing of allowing go.new_library to specify a list of File and library_to_source attrs to specify targets and combines the two. This extends that to embedsrcs.

Signed-off-by: Chris Koch <chrisko@google.com>
@linzhp
Copy link
Contributor

linzhp commented Mar 31, 2022

Can you add tests to tests/core/go_library to cover this feature?

@linzhp linzhp self-assigned this Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants