commit | 0f777e198309a1bc2e5e9c4e71d3e586f6c13530 | [log] [tgz] |
---|---|---|
author | Cameron Martin <cameronmartin123@gmail.com> | Thu Feb 01 17:32:31 2024 +0000 |
committer | GitHub <noreply@github.com> | Thu Feb 01 17:32:31 2024 +0000 |
tree | 39d9ca00670eb99aa49f40ecc30bedae10fa0ebc | |
parent | 649b32d8607a5bfa377468e681b355b9a88ef8f0 [diff] |
Use canonical repo name for aspects (#2450) Currently when running `gen_rust_project`, the aspect given to bazel has the canonical repo name but only a single `@`. This does not work with bzlmod, since it tries to resolve this using the repository mappings, and complains that the repository does not exist: ``` ERROR: Unable to find package for @@[unknown repo 'rules_rust~0.38.0' requested from @@]//rust:defs.bzl: The repository '@@[unknown repo 'rules_rust~0.38.0' requested from @@]' could not be resolved: No repository visible as '@rules_rust~0.38.0' from main repository. ERROR: Analysis of aspects '[@@[unknown repo 'rules_rust~0.38.0' requested from @@]//rust:defs.bzl%rust_analyzer_aspect] with parameters {} on //prost:prost_toolchain_impl' failed; build aborted: Unable to find package for @@[unknown repo 'rules_rust~0.38.0' requested from @@]//rust:defs.bzl: The repository '@@[unknown repo 'rules_rust~0.38.0' requested from @@]' could not be resolved: No repository visible as '@rules_rust~0.38.0' from main repository. ``` This adds an extra `@`, so that the repository in the label is of canonical form. Fixes #2449
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust
.
Please refer to the full documentation.