diff --git a/querysync/java/com/google/idea/blaze/qsync/project/BuildGraphData.java b/querysync/java/com/google/idea/blaze/qsync/project/BuildGraphData.java index 9a6132bad52..898cf15d643 100644 --- a/querysync/java/com/google/idea/blaze/qsync/project/BuildGraphData.java +++ b/querysync/java/com/google/idea/blaze/qsync/project/BuildGraphData.java @@ -407,7 +407,7 @@ public ImmutableSet getDependencyTrackingBehaviors(L * the set of all targets defined in all build packages within the directory (recursively). */ public TargetsToBuild getProjectTargets(Context context, Path workspaceRelativePath) { - if (workspaceRelativePath.endsWith("BUILD")) { + if (workspaceRelativePath.endsWith("BUILD") || workspaceRelativePath.endsWith("BUILD.bazel")) { Path packagePath = workspaceRelativePath.getParent(); return TargetsToBuild.targetGroup(allTargets().get(packagePath)); } else { diff --git a/shared/java/com/google/idea/blaze/common/Label.java b/shared/java/com/google/idea/blaze/common/Label.java index 3254e33df4b..b4c82fef833 100644 --- a/shared/java/com/google/idea/blaze/common/Label.java +++ b/shared/java/com/google/idea/blaze/common/Label.java @@ -47,7 +47,7 @@ public static Label of(String label) { } public static Label fromPackageAndName(Path packagePath, Path name) { - return of(String.format("//%s:%s", packagePath, name)); + return of(String.format("@@//%s:%s", packagePath, name)); } public static Label fromPackageAndName(Path packagePath, String name) {