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

runner: propagate 'testonly' property to sh_binary #2002

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

pjjw
Copy link
Contributor

@pjjw pjjw commented Jan 3, 2025

this makes sure that if testonly is set in the macro, it's propagated
both to the runner and the wrapper sh_binary. as is, setting
'testonly' in the macro will result in an unbuildable sh_binary if there
are testonly dependencies.

why this is needed: slightly esoteric, but our build process currently
uses the gazelle plugin from contrib_rules_jvm. for uninteresting
reasons, this depends on the output of another tool, which itself needs
to process testonly dependencies.

it's a silly little patch we've been carrying for a while, but since currently
setting the property as is results in breakage, thought i might have a shot
at upstreaming it.

@pjjw pjjw force-pushed the pjjw/pass-testonly-to-runner branch from 4ebe79b to dda3c46 Compare January 3, 2025 22:35
@fmeum
Copy link
Member

fmeum commented Jan 4, 2025

Let me know when this is ready

@pjjw pjjw marked this pull request as ready for review January 4, 2025 14:09
@pjjw
Copy link
Contributor Author

pjjw commented Jan 6, 2025

@fmeum good to go, thanks!

this makes sure that if testonly is set in the macro, it's propagated
both to the runner _and_ the wrapper sh_binary. as is, setting
'testonly' in the macro will result in an unbuildable sh_binary if there
are testonly dependencies.

why this is needed: slightly esoteric, but our build process currently
uses the gazelle plugin from contrib_rules_jvm. for uninteresting
reasons, this depends on the output of another tool, which itself needs
to process testonly dependencies.
@fmeum fmeum force-pushed the pjjw/pass-testonly-to-runner branch from dda3c46 to 12cc6fe Compare January 6, 2025 22:31
@fmeum fmeum enabled auto-merge (squash) January 6, 2025 22:31
@fmeum fmeum merged commit 23a2816 into bazel-contrib:master Jan 6, 2025
14 checks passed
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