You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without path mapping, a java_library with no srcs but resources would result in an action with mnemonic JavaResourceJar.
When enabling path mapping, the build fails:
bazel build :foo -s
INFO: Analyzed target //:foo (0 packages loaded, 0 targets configured).
SUBCOMMAND: # //:foo [action 'Building libfoo-class.jar ()', configuration: 79f4dcc0afed0cf3698fedd0369bedac590bfd9d6152eefc68c5e3060c12cef4, execution platform: @@platforms//host:host, mnemonic: Javac]
(cd /REDACTED/execroot/_main && \
exec env - \
PATH=/bin:/usr/bin:/usr/local/bin \
external/rules_java~~toolchains~remotejdk21_linux/bin/java '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.resources=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED' '--add-opens=java.base/java.nio=ALL-UNNAMED' '--add-opens=java.base/java.lang=ALL-UNNAMED' '-Dsun.io.useCanonCaches=false' -XX:-CompactStrings -Xlog:disable '-Xlog:all=warning:stderr:uptime,level,tags' -jar external/rules_java~~toolchains~remote_java_tools/java_tools/JavaBuilder_deploy.jar @bazel-out/cfg/bin/libfoo-class.jar-0.params @bazel-out/cfg/bin/libfoo-class.jar-1.params)
# Configuration: 79f4dcc0afed0cf3698fedd0369bedac590bfd9d6152eefc68c5e3060c12cef4
# Execution platform: @@platforms//host:host
ERROR: /REDACTED/BUILD:149:13: output 'libfoo-class.jar' was not created
ERROR: /REDACTED/BUILD:149:13: output 'libfoo-native-header.jar' was not created
ERROR: /REDACTED/BUILD:149:13: output 'libfoo.jar_manifest_proto' was not created
ERROR: /REDACTED/BUILD:149:13: Building libfoo-class.jar () failed: not all outputs were created or valid
Target //:foo failed to build
Description of the bug:
Without path mapping, a
java_library
with nosrcs
butresources
would result in an action with mnemonicJavaResourceJar
.When enabling path mapping, the build fails:
Without path mapping, this is the output:
Which category does this issue belong to?
Java Rules
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
BUILD.bazel:
file.txt:
.bazelrc:
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?release 7.3.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
This was most likely introduced with Bazel 7 (in this PR #18098, commit 29f1db2)
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: