Skip to content

Commit 230e2f0

Browse files
author
Aalyria Technologies, Inc
committed
Import changes.
- 2a9b7239c4bb15dc7ffc0325a03243bf9b6b73a9 GitOrigin-RevId: 2a9b7239c4bb15dc7ffc0325a03243bf9b6b73a9
1 parent c393aa0 commit 230e2f0

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

MODULE.bazel

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ register_toolchains(
172172
"//api/build_tools/prost_toolchain",
173173
)
174174

175+
# All of these crates come from crates.io, hence the "crates_io" name.
176+
# The "st_" (spacetime) prefix is required to avoid a collision with the
177+
# nmts submodule, which defines its own "crates_io" (and "crates") repo:
178+
# rules_rust's crate extension is shared across the whole module graph,
179+
# so two modules generating a repo of the same name would error.
175180
crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
176181
crate.spec(
177182
package = "prost",
@@ -212,9 +217,9 @@ crate.annotation(
212217
gen_binaries = ["protoc-gen-tonic"],
213218
)
214219
crate.from_specs(
215-
name = "spacetime_crates",
220+
name = "st_crates_io",
216221
)
217-
use_repo(crate, "spacetime_crates")
222+
use_repo(crate, "st_crates_io")
218223

219224
bazel_dep(name = "org_outernetcouncil_nmts")
220225
archive_override(

api/build_tools/prost_toolchain/BUILD

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ load("@rules_rust_prost//:defs.bzl", "rust_prost_toolchain")
1818
rust_library_group(
1919
name = "prost_runtime",
2020
deps = [
21-
"@spacetime_crates//:prost",
21+
"@st_crates_io//:prost",
2222
],
2323
)
2424

2525
rust_library_group(
2626
name = "tonic_runtime",
2727
deps = [
2828
":prost_runtime",
29-
"@spacetime_crates//:tonic",
30-
"@spacetime_crates//:tonic-prost",
29+
"@st_crates_io//:tonic",
30+
"@st_crates_io//:tonic-prost",
3131
],
3232
)
3333

3434
rust_prost_toolchain(
3535
name = "prost_toolchain_impl",
3636
compile_well_known_types = False,
37-
prost_plugin = "@spacetime_crates//:protoc-gen-prost__protoc-gen-prost",
37+
prost_plugin = "@st_crates_io//:protoc-gen-prost__protoc-gen-prost",
3838
prost_runtime = ":prost_runtime",
39-
prost_types = "@spacetime_crates//:prost-types",
40-
tonic_plugin = "@spacetime_crates//:protoc-gen-tonic__protoc-gen-tonic",
39+
prost_types = "@st_crates_io//:prost-types",
40+
tonic_plugin = "@st_crates_io//:protoc-gen-tonic__protoc-gen-tonic",
4141
tonic_runtime = ":tonic_runtime",
4242
)
4343

0 commit comments

Comments
 (0)