We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd1487c commit e4a1966Copy full SHA for e4a1966
scala/private/macros/bzlmod.bzl
@@ -67,7 +67,9 @@ def apparent_repo_label_string(label):
67
label_str = "@" + str(label).lstrip("@")
68
return label_str.replace(label.repo_name, apparent_repo_name(label))
69
70
-_MAIN_REPO_PREFIX = str(Label("//:all")).split(":")[0]
+_IS_BZLMOD_ENABLED = str(Label("//:all")).startswith("@@")
71
+
72
+_MAIN_REPO_PREFIX = "@@//" if _IS_BZLMOD_ENABLED else "@//"
73
74
def adjust_main_repo_prefix(target_pattern):
75
"""Updates the main repo prefix to match the current Bazel version.
0 commit comments