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

Do not match java_binary deploy.jar with wildcard target patterns #17115

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ def register_java_binary_rules(rule_exec, rule_nonexec, rule_nolauncher, rule_cu
deploy_jar_args = _filtered_dict(kwargs, _DEPLOY_JAR_RULE_ATTRS)
if is_test_rule_class:
deploy_jar_args["testonly"] = True

# Do not let the deploy jar be matched by wildcard target patterns.
deploy_jar_args.setdefault("tags", [])
if "manual" not in deploy_jar_args["tags"]:
deploy_jar_args["tags"].append("manual")
rule_deploy_jars(
name = kwargs["name"] + DEPLOY_JAR_RULE_NAME_SUFFIX, # to avoid collision
binary = kwargs["name"],
Expand Down