Skip to content

Commit 3d30ba0

Browse files
authored
Load toolchains_llvm dependencies earlier in tests (#682)
There are certain dependency requirements for toolchains_llvm. Without Bzlmod, the user must take care that are correct or call the macro to load transitive dependencies. If this is done in a too late step, a version of a transitive dependency might be taken instead of the one that toolchains_llvm require. This commit move the load at the beginning to mimic what the user should do without Bzlmod. With this change, the version of skylib defined in toolchains_llvm is taken instead of the one defined in bazel_features repository.
1 parent d04fb9d commit 3d30ba0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ local_repository(
1919
path = "..",
2020
)
2121

22+
load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")
23+
24+
bazel_toolchain_dependencies()
25+
2226
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2327

2428
http_archive(
@@ -50,10 +54,6 @@ load("@tar.bzl//tar:extensions.bzl", "create_repositories")
5054

5155
create_repositories()
5256

53-
load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")
54-
55-
bazel_toolchain_dependencies()
56-
5757
load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")
5858

5959
# When updating this version, also update the versions associated with

0 commit comments

Comments
 (0)