Skip to content

Commit 3aab1ca

Browse files
hauserxGrzegorz Lukasik
authored andcommitted
Don't register rust_host_tools twice
The bazel-lsp uses `rust_host_tools` to perform some actions: by using: rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools") use_repo(rust_host_tools, "rust_host_tools") See: https://github.com/cameron-martin/bazel-lsp/blob/19b799e528c884be6efeb108ed1840a4edff1330/MODULE.bazel#L14 It started failing after bazelbuild#3148 because rules_rust's MODULE.bazel registers toolchain with the same name: rust_host_tools.host_tools( name = "rust_host_tools", ) See: https://github.com/bazelbuild/rules_rust/blob/aae84e97c73eae2e6654e1a7e1b751d0c1f2ac9e/MODULE.bazel#L70
1 parent aae84e9 commit 3aab1ca

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

rust/extensions.bzl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -265,18 +265,6 @@ def _rust_host_tools_impl(module_ctx):
265265
**attrs
266266
)
267267

268-
# If no tags were specified, create a default repository.
269-
if not mod.tags.host_tools:
270-
attrs = {
271-
"name": "rust_host_tools",
272-
"version": rust_common.default_version,
273-
}
274-
rust_toolchain_tools_repository(
275-
exec_triple = host_triple.str,
276-
target_triple = host_triple.str,
277-
**attrs
278-
)
279-
280268
metadata_kwargs = {}
281269
if bazel_features.external_deps.extension_metadata_has_reproducible:
282270
metadata_kwargs["reproducible"] = True

0 commit comments

Comments
 (0)