Skip to content

Commit aae84e9

Browse files
sputtUebelAndre
andauthored
Fix toolchain repo aliases and add a test. (#3181)
Co-authored-by: UebelAndre <[email protected]>
1 parent af70b2a commit aae84e9

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

.bazelci/presubmit.yml

+1
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ tasks:
585585
working_directory: test/aliased_toolchains
586586
build_targets:
587587
- "@rust_toolchains//:all"
588+
- "//..."
588589
android_examples_ubuntu2004:
589590
name: Android Examples
590591
platform: ubuntu2004

rust/repositories.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def rust_register_toolchains(
269269
sha256s = sha256s,
270270
urls = urls,
271271
versions = versions,
272-
aliases = aliases,
272+
aliases = dict(aliases),
273273
)
274274

275275
for toolchain in _get_toolchain_repositories(

test/aliased_toolchains/BUILD.bazel

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
load("@rules_rust//rust:defs.bzl", "rust_library")
2+
3+
rust_library(
4+
name = "hello",
5+
srcs = ["hello.rs"],
6+
)

test/aliased_toolchains/hello.rs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub fn hello() {}

test/empty_suite/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@rules_shell//shell:sh_test.bzl", "sh_test")
22
load("//rust:defs.bzl", "rust_library", "rust_test", "rust_test_suite")
33

44
# This package has a rust_test_suite containing no tests.
5-
# (This could happen if the srcs were seleceted via a glob).
5+
# (This could happen if the srcs were selected via a glob).
66
#
77
# We test that the test suite exists and is empty, bypassing test_suite's
88
# special-case behavior for empty suites.

0 commit comments

Comments
 (0)