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

Cherry-pick -> KE2: Bazel: Flip --incompatible_use_plus_in_repo_names. #18048

Open
wants to merge 1 commit into
base: ke2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ common --registry=https://bcr.bazel.build

common --@rules_dotnet//dotnet/settings:strict_deps=false
common --experimental_isolated_extension_usages
common --incompatible_use_plus_in_repo_names

try-import %workspace%/local.bazelrc
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bazel_dep(name = "rules_kotlin", version = "1.9.6-codeql.1")
bazel_dep(name = "gazelle", version = "0.38.0")
bazel_dep(name = "rules_dotnet", version = "0.15.1")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
bazel_dep(name = "rules_rust", version = "0.50.0")
bazel_dep(name = "rules_rust", version = "0.52.2")
bazel_dep(name = "rules_jvm_external", version = "6.2")

bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
Expand Down
2 changes: 1 addition & 1 deletion java/kotlin-extractor/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _get_dep(repository_ctx, name):
return repository_ctx.path(Label("//java/kotlin-extractor/deps:%s" % name))

def _kotlin_dep_impl(repository_ctx):
_, _, name = repository_ctx.name.rpartition("~")
_, _, name = repository_ctx.name.rpartition("+")
lfs_smudge(repository_ctx, [_get_dep(repository_ctx, name + ".jar")])

# for some reason rules_kotlin warns about these jars missing, this is to silence those warnings
Expand Down
2 changes: 1 addition & 1 deletion misc/bazel/internal/zipmerge/zipmerge_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ std::string get_file(const char* name) {
return ret;
}();
// this works from both `codeql` and the internal repository
for (auto prefix : {"_main", "ql~"}) {
for (auto prefix : {"_main", "ql+"}) {
auto ret = runfiles->Rlocation(prefix + "/misc/bazel/internal/zipmerge/test-files/"s + name);
if (fs::exists(ret)) {
return ret;
Expand Down
4 changes: 2 additions & 2 deletions misc/bazel/lfs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def _download_lfs(repository_ctx):
srcs = [f for f in dir.readdir() if not f.is_dir]
lfs_smudge(repository_ctx, srcs, executable = repository_ctx.attr.executable)

# with bzlmod the name is qualified with `~` separators, and we want the base name here
name = repository_ctx.name.split("~")[-1]
# with bzlmod the name is qualified with `+` separators, and we want the base name here
name = repository_ctx.name.split("+")[-1]
basenames = [src.basename for src in srcs]
build = "exports_files(%s)\n" % repr(basenames)

Expand Down
2 changes: 1 addition & 1 deletion misc/ripunzip/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eu

source misc/bazel/runfiles.sh 2>/dev/null || source external/ql~/misc/bazel/runfiles.sh
source misc/bazel/runfiles.sh 2>/dev/null || source external/ql+/misc/bazel/runfiles.sh

dest="${2:-$HOME/.local/bin}"

Expand Down
Loading