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 --incompatible_allow_tags_propagation in native JavaResourceJar actions #25033

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Silic0nS0ldier
Copy link
Contributor

@Silic0nS0ldier Silic0nS0ldier commented Jan 23, 2025

This fixes a bug where tags were not being propagated to JavaResourceJar actions (e.g. java_test(.., resources = ["foo"], ...) like with other native rule actions when --incompatible_allow_tags_propagation is provided.

Relates to #8004

A test case has been added (building on changes in #25050).

Before:

action 'Building Java resource jar'
  Mnemonic: JavaResourceJar
  Target: //test:test
  Configuration: k8-fastbuild
  Execution platform: @@platforms//host:host
  ActionKey: 3b749c8811bd0c61168241c1eefd8db5808251fb8c16c45a663c3154d451485a
  Inputs: [bazel-out/k8-fastbuild/bin/test/test-class.jar, external/rules_java++toolchains+remote_java_tools_linux/java_tools/src/tools/singlejar/singlejar_local, test/HelloTests.java]
  Outputs: [bazel-out/k8-fastbuild/bin/test/test.jar]
  Command Line: (exec external/rules_java++toolchains+remote_java_tools_linux/java_tools/src/tools/singlejar/singlejar_local \
    --normalize \
    --dont_change_compression \
    --exclude_build_data \
    --output \
    bazel-out/k8-fastbuild/bin/test/test.jar \
    --sources \
    bazel-out/k8-fastbuild/bin/test/test-class.jar \
    --resources \
    test/HelloTests.java)
# Configuration: a5841cb06d135209cf0f6770d4ead3790474db9531abbac3a35bd81172c0e7ad
# Execution platform: @@platforms//host:host
  ExecutionInfo: {supports-path-mapping: 1}

After:

action 'Building Java resource jar'
  Mnemonic: JavaResourceJar
  Target: //test:test
  Configuration: k8-fastbuild
  Execution platform: @@platforms//host:host
  ActionKey: 684d899f9fe3fd972719c0b7ddcd7bd752265b2d746fbbe89c4b35092f2a7073
  Inputs: [bazel-out/k8-fastbuild/bin/test/test-class.jar, external/rules_java++toolchains+remote_java_tools_linux/java_tools/src/tools/singlejar/singlejar_local, test/HelloTests.java]
  Outputs: [bazel-out/k8-fastbuild/bin/test/test.jar]
  Command Line: (exec external/rules_java++toolchains+remote_java_tools_linux/java_tools/src/tools/singlejar/singlejar_local \
    --normalize \
    --dont_change_compression \
    --exclude_build_data \
    --output \
    bazel-out/k8-fastbuild/bin/test/test.jar \
    --sources \
    bazel-out/k8-fastbuild/bin/test/test-class.jar \
    --resources \
    test/HelloTests.java)
# Configuration: a5841cb06d135209cf0f6770d4ead3790474db9531abbac3a35bd81172c0e7ad
# Execution platform: @@platforms//host:host
  ExecutionInfo: {local: '', no-cache: '', no-remote: '', supports-path-mapping: 1}

@github-actions github-actions bot added team-Rules-Java Issues for Java rules awaiting-review PR is awaiting review from an assigned reviewer labels Jan 23, 2025
@Silic0nS0ldier
Copy link
Contributor Author

cc @lberki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant