Skip to content

Commit 8a5afe1

Browse files
authored
Populate cargo env vars for crate_universe targets (#3260)
Fixes #2677 Fixes #3250
1 parent ae678d2 commit 8a5afe1

File tree

1,499 files changed

+18200
-3054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,499 files changed

+18200
-3054
lines changed

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ use_repo(
7171
"generated_inputs_in_external_repo",
7272
"libc",
7373
"rtra",
74-
"rtra__serde-1.0.218",
75-
"rtra__serde_json-1.0.139",
74+
"rtra__serde-1.0.219",
75+
"rtra__serde_json-1.0.140",
7676
"rules_rust_test_load_arbitrary_tool",
7777
"rules_rust_toolchain_test_target_json",
7878
)

cargo/cargo_toml_variable_extractor/3rdparty/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//crate_universe:defs.bzl", "crate", "crates_vendor")
1+
load("//crate_universe:defs.bzl", "crate", "crates_vendor", "render_config")
22

33
crates_vendor(
44
name = "crates_vendor",
@@ -10,6 +10,7 @@ crates_vendor(
1010
"semver": crate.spec(version = "1"),
1111
"toml": crate.spec(version = "0.8.14"),
1212
},
13+
render_config = render_config(generate_cargo_toml_env_vars = False),
1314
repository_name = "rules_rust_ctve",
1415
tags = ["manual"],
1516
)

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.cargo_toml-0.20.5.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "cargo_toml",
1521
srcs = glob(
@@ -30,6 +36,9 @@ rust_library(
3036
),
3137
crate_root = "src/cargo_toml.rs",
3238
edition = "2021",
39+
rustc_env_files = [
40+
":cargo_toml_env_vars",
41+
],
3342
rustc_flags = [
3443
"--cap-lints=allow",
3544
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.equivalent-1.0.1.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "equivalent",
1521
srcs = glob(
@@ -30,6 +36,9 @@ rust_library(
3036
),
3137
crate_root = "src/lib.rs",
3238
edition = "2015",
39+
rustc_env_files = [
40+
":cargo_toml_env_vars",
41+
],
3342
rustc_flags = [
3443
"--cap-lints=allow",
3544
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.hashbrown-0.15.1.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "hashbrown",
1521
srcs = glob(
@@ -30,6 +36,9 @@ rust_library(
3036
),
3137
crate_root = "src/lib.rs",
3238
edition = "2021",
39+
rustc_env_files = [
40+
":cargo_toml_env_vars",
41+
],
3342
rustc_flags = [
3443
"--cap-lints=allow",
3544
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.indexmap-2.6.0.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "indexmap",
1521
srcs = glob(
@@ -34,6 +40,9 @@ rust_library(
3440
],
3541
crate_root = "src/lib.rs",
3642
edition = "2021",
43+
rustc_env_files = [
44+
":cargo_toml_env_vars",
45+
],
3746
rustc_flags = [
3847
"--cap-lints=allow",
3948
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.memchr-2.7.4.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "memchr",
1521
srcs = glob(
@@ -30,6 +36,9 @@ rust_library(
3036
),
3137
crate_root = "src/lib.rs",
3238
edition = "2021",
39+
rustc_env_files = [
40+
":cargo_toml_env_vars",
41+
],
3342
rustc_flags = [
3443
"--cap-lints=allow",
3544
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.proc-macro2-1.0.89.bazel

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9-
load("@rules_rust//cargo:defs.bzl", "cargo_build_script")
9+
load(
10+
"@rules_rust//cargo:defs.bzl",
11+
"cargo_build_script",
12+
"cargo_toml_env_vars",
13+
)
1014
load("@rules_rust//rust:defs.bzl", "rust_library")
1115

1216
package(default_visibility = ["//visibility:public"])
1317

18+
cargo_toml_env_vars(
19+
name = "cargo_toml_env_vars",
20+
src = "Cargo.toml",
21+
)
22+
1423
rust_library(
1524
name = "proc_macro2",
1625
srcs = glob(
@@ -34,6 +43,9 @@ rust_library(
3443
],
3544
crate_root = "src/lib.rs",
3645
edition = "2021",
46+
rustc_env_files = [
47+
":cargo_toml_env_vars",
48+
],
3749
rustc_flags = [
3850
"--cap-lints=allow",
3951
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.quote-1.0.37.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "quote",
1521
srcs = glob(
@@ -33,6 +39,9 @@ rust_library(
3339
],
3440
crate_root = "src/lib.rs",
3541
edition = "2018",
42+
rustc_env_files = [
43+
":cargo_toml_env_vars",
44+
],
3645
rustc_flags = [
3746
"--cap-lints=allow",
3847
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.serde-1.0.214.bazel

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9-
load("@rules_rust//cargo:defs.bzl", "cargo_build_script")
9+
load(
10+
"@rules_rust//cargo:defs.bzl",
11+
"cargo_build_script",
12+
"cargo_toml_env_vars",
13+
)
1014
load("@rules_rust//rust:defs.bzl", "rust_library")
1115

1216
package(default_visibility = ["//visibility:public"])
1317

18+
cargo_toml_env_vars(
19+
name = "cargo_toml_env_vars",
20+
src = "Cargo.toml",
21+
)
22+
1423
rust_library(
1524
name = "serde",
1625
srcs = glob(
@@ -40,6 +49,9 @@ rust_library(
4049
proc_macro_deps = [
4150
"@rrcti__serde_derive-1.0.214//:serde_derive",
4251
],
52+
rustc_env_files = [
53+
":cargo_toml_env_vars",
54+
],
4355
rustc_flags = [
4456
"--cap-lints=allow",
4557
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.serde_derive-1.0.214.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_proc_macro")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_proc_macro(
1420
name = "serde_derive",
1521
srcs = glob(
@@ -33,6 +39,9 @@ rust_proc_macro(
3339
],
3440
crate_root = "src/lib.rs",
3541
edition = "2015",
42+
rustc_env_files = [
43+
":cargo_toml_env_vars",
44+
],
3645
rustc_flags = [
3746
"--cap-lints=allow",
3847
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.serde_spanned-0.6.8.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "serde_spanned",
1521
srcs = glob(
@@ -33,6 +39,9 @@ rust_library(
3339
],
3440
crate_root = "src/lib.rs",
3541
edition = "2021",
42+
rustc_env_files = [
43+
":cargo_toml_env_vars",
44+
],
3645
rustc_flags = [
3746
"--cap-lints=allow",
3847
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.syn-2.0.87.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "syn",
1521
srcs = glob(
@@ -37,6 +43,9 @@ rust_library(
3743
],
3844
crate_root = "src/lib.rs",
3945
edition = "2021",
46+
rustc_env_files = [
47+
":cargo_toml_env_vars",
48+
],
4049
rustc_flags = [
4150
"--cap-lints=allow",
4251
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.toml-0.8.19.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "toml",
1521
srcs = glob(
@@ -35,6 +41,9 @@ rust_library(
3541
],
3642
crate_root = "src/lib.rs",
3743
edition = "2021",
44+
rustc_env_files = [
45+
":cargo_toml_env_vars",
46+
],
3847
rustc_flags = [
3948
"--cap-lints=allow",
4049
],

cargo/private/cargo_toml_info/3rdparty/crates/BUILD.toml_datetime-0.6.8.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
# bazel run @@//cargo/private/cargo_toml_info/3rdparty:crates_vendor
77
###############################################################################
88

9+
load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
910
load("@rules_rust//rust:defs.bzl", "rust_library")
1011

1112
package(default_visibility = ["//visibility:public"])
1213

14+
cargo_toml_env_vars(
15+
name = "cargo_toml_env_vars",
16+
src = "Cargo.toml",
17+
)
18+
1319
rust_library(
1420
name = "toml_datetime",
1521
srcs = glob(
@@ -33,6 +39,9 @@ rust_library(
3339
],
3440
crate_root = "src/lib.rs",
3541
edition = "2021",
42+
rustc_env_files = [
43+
":cargo_toml_env_vars",
44+
],
3645
rustc_flags = [
3746
"--cap-lints=allow",
3847
],

0 commit comments

Comments
 (0)