Skip to content

Commit

Permalink
Fix toolchain repo aliases and add a test. (#3181)
Browse files Browse the repository at this point in the history
Co-authored-by: UebelAndre <[email protected]>
  • Loading branch information
sputt and UebelAndre authored Jan 20, 2025
1 parent af70b2a commit aae84e9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ tasks:
working_directory: test/aliased_toolchains
build_targets:
- "@rust_toolchains//:all"
- "//..."
android_examples_ubuntu2004:
name: Android Examples
platform: ubuntu2004
Expand Down
2 changes: 1 addition & 1 deletion rust/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def rust_register_toolchains(
sha256s = sha256s,
urls = urls,
versions = versions,
aliases = aliases,
aliases = dict(aliases),
)

for toolchain in _get_toolchain_repositories(
Expand Down
6 changes: 6 additions & 0 deletions test/aliased_toolchains/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
load("@rules_rust//rust:defs.bzl", "rust_library")

rust_library(
name = "hello",
srcs = ["hello.rs"],
)
1 change: 1 addition & 0 deletions test/aliased_toolchains/hello.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub fn hello() {}
2 changes: 1 addition & 1 deletion test/empty_suite/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@rules_shell//shell:sh_test.bzl", "sh_test")
load("//rust:defs.bzl", "rust_library", "rust_test", "rust_test_suite")

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

0 comments on commit aae84e9

Please sign in to comment.