aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-04-14 15:58:54 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-04-15 16:17:37 +0000
commit5590dc4259c3e850282f0916fb05d5aadc7ec861 (patch)
tree9138d0da719e3804f8c97214792eba167cab9adb /src/main/java
parent89bdeaac7010257ad2a34f11d0d9de58cb0b2db9 (diff)
Make the indirect dependency message show the correct label for external deps
Previously it would show the relative path within the external dep (e.g., in the given test, "** Please add the following dependencies: x to //a:a"). Fixes https://github.com/google/bazel/issues/112. -- MOS_MIGRATED_REVID=91093258
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
index 28bc1c98a8..572fcc112f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
@@ -646,7 +646,8 @@ public class JavaCompileAction extends AbstractAction {
Label label = getTargetName(jar);
builder.add(label.getPackageIdentifier().getRepository().isDefault()
? label.toString()
- : label.toPathFragment().toString());
+ // Escape '@' prefix for .params file.
+ : "@" + label.toString());
}
return builder.build();
}