Skip to content

Commit 0efebf0

Browse files
authored
Move Cargo binaries to //cargo/private (#3694)
This is to clarify that the interface of these binaries are internal. They're only use is to power actions for other `//cargo` rules.
1 parent 92bd309 commit 0efebf0

File tree

25 files changed

+39
-39
lines changed

25 files changed

+39
-39
lines changed

.bazelci/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ default_rbe_targets: &default_rbe_targets
6262
- "//..."
6363
# These require the upstream tools wrapper to include a stdlib, which doesn't currently work on RBE.
6464
# We should fix this. See https://github.com/bazelbuild/rules_rust/issues/3252
65-
- "-//cargo/cargo_toml_variable_extractor/testdata/..."
65+
- "-//cargo/private/cargo_toml_variable_extractor/testdata/..."
6666
default_macos_targets: &default_macos_targets
6767
- "--"
6868
- "//..."

cargo/3rdparty/crates/defs.bzl

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -293,100 +293,100 @@ def aliases(
293293
###############################################################################
294294

295295
_NORMAL_DEPENDENCIES = {
296-
"cargo/cargo_toml_variable_extractor": {
296+
"cargo/private/cargo_toml_info": {
297+
_COMMON_CONDITION: {
298+
"cargo_toml": Label("@rrc//:cargo_toml-0.20.5"),
299+
},
300+
},
301+
"cargo/private/cargo_toml_variable_extractor": {
297302
_COMMON_CONDITION: {
298303
"cargo-util-schemas": Label("@rrc//:cargo-util-schemas-0.3.1"),
299304
"pathdiff": Label("@rrc//:pathdiff-0.1.0"),
300305
"semver": Label("@rrc//:semver-1.0.25"),
301306
"toml": Label("@rrc//:toml-0.8.20"),
302307
},
303308
},
304-
"cargo/private/cargo_toml_info": {
305-
_COMMON_CONDITION: {
306-
"cargo_toml": Label("@rrc//:cargo_toml-0.20.5"),
307-
},
308-
},
309309
}
310310

311311
_NORMAL_ALIASES = {
312-
"cargo/cargo_toml_variable_extractor": {
312+
"cargo/private/cargo_toml_info": {
313313
_COMMON_CONDITION: {
314314
},
315315
},
316-
"cargo/private/cargo_toml_info": {
316+
"cargo/private/cargo_toml_variable_extractor": {
317317
_COMMON_CONDITION: {
318318
},
319319
},
320320
}
321321

322322
_NORMAL_DEV_DEPENDENCIES = {
323-
"cargo/cargo_toml_variable_extractor": {
324-
},
325323
"cargo/private/cargo_toml_info": {
326324
},
325+
"cargo/private/cargo_toml_variable_extractor": {
326+
},
327327
}
328328

329329
_NORMAL_DEV_ALIASES = {
330-
"cargo/cargo_toml_variable_extractor": {
331-
},
332330
"cargo/private/cargo_toml_info": {
333331
},
332+
"cargo/private/cargo_toml_variable_extractor": {
333+
},
334334
}
335335

336336
_PROC_MACRO_DEPENDENCIES = {
337-
"cargo/cargo_toml_variable_extractor": {
338-
},
339337
"cargo/private/cargo_toml_info": {
340338
},
339+
"cargo/private/cargo_toml_variable_extractor": {
340+
},
341341
}
342342

343343
_PROC_MACRO_ALIASES = {
344-
"cargo/cargo_toml_variable_extractor": {
345-
},
346344
"cargo/private/cargo_toml_info": {
347345
},
346+
"cargo/private/cargo_toml_variable_extractor": {
347+
},
348348
}
349349

350350
_PROC_MACRO_DEV_DEPENDENCIES = {
351-
"cargo/cargo_toml_variable_extractor": {
352-
},
353351
"cargo/private/cargo_toml_info": {
354352
},
353+
"cargo/private/cargo_toml_variable_extractor": {
354+
},
355355
}
356356

357357
_PROC_MACRO_DEV_ALIASES = {
358-
"cargo/cargo_toml_variable_extractor": {
359-
},
360358
"cargo/private/cargo_toml_info": {
361359
},
360+
"cargo/private/cargo_toml_variable_extractor": {
361+
},
362362
}
363363

364364
_BUILD_DEPENDENCIES = {
365-
"cargo/cargo_toml_variable_extractor": {
366-
},
367365
"cargo/private/cargo_toml_info": {
368366
},
367+
"cargo/private/cargo_toml_variable_extractor": {
368+
},
369369
}
370370

371371
_BUILD_ALIASES = {
372-
"cargo/cargo_toml_variable_extractor": {
373-
},
374372
"cargo/private/cargo_toml_info": {
375373
},
374+
"cargo/private/cargo_toml_variable_extractor": {
375+
},
376376
}
377377

378378
_BUILD_PROC_MACRO_DEPENDENCIES = {
379-
"cargo/cargo_toml_variable_extractor": {
380-
},
381379
"cargo/private/cargo_toml_info": {
382380
},
381+
"cargo/private/cargo_toml_variable_extractor": {
382+
},
383383
}
384384

385385
_BUILD_PROC_MACRO_ALIASES = {
386-
"cargo/cargo_toml_variable_extractor": {
387-
},
388386
"cargo/private/cargo_toml_info": {
389387
},
388+
"cargo/private/cargo_toml_variable_extractor": {
389+
},
390390
}
391391

392392
_CONDITIONS = {

cargo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
22
members = [
3-
"cargo_toml_variable_extractor",
3+
"private/cargo_toml_variable_extractor",
44
"private/cargo_toml_info",
55
]
File renamed without changes.

cargo/private/cargo_bootstrap.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ rust_binary(
136136
"{binary}",
137137
],
138138
srcs = [
139-
"@rules_rust//cargo/bootstrap:bootstrap_installer.rs"
139+
"@rules_rust//cargo/private/bootstrap:bootstrap_installer.rs"
140140
],
141141
)
142142
"""

cargo/private/cargo_build_script.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ cargo_build_script = rule(
710710
"_cargo_build_script_runner": attr.label(
711711
executable = True,
712712
allow_files = True,
713-
default = Label("//cargo/cargo_build_script_runner:runner"),
713+
default = Label("//cargo/private/cargo_build_script_runner:runner"),
714714
cfg = "exec",
715715
),
716716
"_cargo_manifest_dir_filename_suffixes_to_retain": attr.label(

0 commit comments

Comments
 (0)