`crate.select()` support (#1977)
Updates `crate.annotation()` to support `crate.select()`.
Also includes a bunch of hopefully desirable cleanups, like removing the
`serialize_starlark()` workaround that was no longer necessary.
diff --git a/crate_universe/3rdparty/crates/BUILD.adler-1.0.2.bazel b/crate_universe/3rdparty/crates/BUILD.adler-1.0.2.bazel
index 0ecef42..228831b 100644
--- a/crate_universe/3rdparty/crates/BUILD.adler-1.0.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.adler-1.0.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=adler",
diff --git a/crate_universe/3rdparty/crates/BUILD.ahash-0.7.6.bazel b/crate_universe/3rdparty/crates/BUILD.ahash-0.7.6.bazel
index 2e581da..5a7937f 100644
--- a/crate_universe/3rdparty/crates/BUILD.ahash-0.7.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.ahash-0.7.6.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=ahash",
diff --git a/crate_universe/3rdparty/crates/BUILD.aho-corasick-1.0.2.bazel b/crate_universe/3rdparty/crates/BUILD.aho-corasick-1.0.2.bazel
index 72bd424..0f3a718 100644
--- a/crate_universe/3rdparty/crates/BUILD.aho-corasick-1.0.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.aho-corasick-1.0.2.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=aho-corasick",
diff --git a/crate_universe/3rdparty/crates/BUILD.android-tzdata-0.1.1.bazel b/crate_universe/3rdparty/crates/BUILD.android-tzdata-0.1.1.bazel
index 5d69702..b230803 100644
--- a/crate_universe/3rdparty/crates/BUILD.android-tzdata-0.1.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.android-tzdata-0.1.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=android-tzdata",
diff --git a/crate_universe/3rdparty/crates/BUILD.android_system_properties-0.1.5.bazel b/crate_universe/3rdparty/crates/BUILD.android_system_properties-0.1.5.bazel
index d96a7e9..5f67d95 100644
--- a/crate_universe/3rdparty/crates/BUILD.android_system_properties-0.1.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.android_system_properties-0.1.5.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=android_system_properties",
diff --git a/crate_universe/3rdparty/crates/BUILD.anstream-0.3.2.bazel b/crate_universe/3rdparty/crates/BUILD.anstream-0.3.2.bazel
index ab3c1d3..23d20a3 100644
--- a/crate_universe/3rdparty/crates/BUILD.anstream-0.3.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.anstream-0.3.2.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=anstream",
diff --git a/crate_universe/3rdparty/crates/BUILD.anstyle-1.0.1.bazel b/crate_universe/3rdparty/crates/BUILD.anstyle-1.0.1.bazel
index 7cb0a8d..35352d3 100644
--- a/crate_universe/3rdparty/crates/BUILD.anstyle-1.0.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.anstyle-1.0.1.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=anstyle",
diff --git a/crate_universe/3rdparty/crates/BUILD.anstyle-parse-0.2.1.bazel b/crate_universe/3rdparty/crates/BUILD.anstyle-parse-0.2.1.bazel
index 1da4d8d..e9f2b95 100644
--- a/crate_universe/3rdparty/crates/BUILD.anstyle-parse-0.2.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.anstyle-parse-0.2.1.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=anstyle-parse",
diff --git a/crate_universe/3rdparty/crates/BUILD.anstyle-query-1.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.anstyle-query-1.0.0.bazel
index cbc6067..4718972 100644
--- a/crate_universe/3rdparty/crates/BUILD.anstyle-query-1.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.anstyle-query-1.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=anstyle-query",
diff --git a/crate_universe/3rdparty/crates/BUILD.anstyle-wincon-1.0.1.bazel b/crate_universe/3rdparty/crates/BUILD.anstyle-wincon-1.0.1.bazel
index 69b0aaa..34c9b1d 100644
--- a/crate_universe/3rdparty/crates/BUILD.anstyle-wincon-1.0.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.anstyle-wincon-1.0.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=anstyle-wincon",
diff --git a/crate_universe/3rdparty/crates/BUILD.anyhow-1.0.75.bazel b/crate_universe/3rdparty/crates/BUILD.anyhow-1.0.75.bazel
index 4dcdd3b..7f63d62 100644
--- a/crate_universe/3rdparty/crates/BUILD.anyhow-1.0.75.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.anyhow-1.0.75.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=anyhow",
diff --git a/crate_universe/3rdparty/crates/BUILD.arc-swap-1.6.0.bazel b/crate_universe/3rdparty/crates/BUILD.arc-swap-1.6.0.bazel
index 521c205..0761aa0 100644
--- a/crate_universe/3rdparty/crates/BUILD.arc-swap-1.6.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.arc-swap-1.6.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=arc-swap",
diff --git a/crate_universe/3rdparty/crates/BUILD.arrayvec-0.7.4.bazel b/crate_universe/3rdparty/crates/BUILD.arrayvec-0.7.4.bazel
index 3a43610..871e7e9 100644
--- a/crate_universe/3rdparty/crates/BUILD.arrayvec-0.7.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.arrayvec-0.7.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=arrayvec",
diff --git a/crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel
index e1f383a..c0734ba 100644
--- a/crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=autocfg",
diff --git a/crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel b/crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel
index 87cb01b..3364535 100644
--- a/crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=bitflags",
diff --git a/crate_universe/3rdparty/crates/BUILD.bitflags-2.4.1.bazel b/crate_universe/3rdparty/crates/BUILD.bitflags-2.4.1.bazel
index db157be..5d92487 100644
--- a/crate_universe/3rdparty/crates/BUILD.bitflags-2.4.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.bitflags-2.4.1.bazel
@@ -30,85 +30,87 @@
),
crate_features = select({
"@rules_rust//rust/platform:aarch64-apple-darwin": [
- "std",
+ "std", # aarch64-apple-darwin
],
"@rules_rust//rust/platform:aarch64-apple-ios": [
- "std",
+ "std", # aarch64-apple-ios
],
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [
- "std",
+ "std", # aarch64-apple-ios-sim
],
"@rules_rust//rust/platform:aarch64-fuchsia": [
- "std",
+ "std", # aarch64-fuchsia
],
"@rules_rust//rust/platform:aarch64-linux-android": [
- "std",
+ "std", # aarch64-linux-android
],
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [
- "std",
+ "std", # aarch64-unknown-linux-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [
- "std",
+ "std", # aarch64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [
- "std",
+ "std", # aarch64-unknown-nto-qnx710
],
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [
- "std",
+ "std", # arm-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:armv7-linux-androideabi": [
- "std",
+ "std", # armv7-linux-androideabi
],
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [
- "std",
+ "std", # armv7-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:i686-apple-darwin": [
- "std",
+ "std", # i686-apple-darwin
],
"@rules_rust//rust/platform:i686-linux-android": [
- "std",
+ "std", # i686-linux-android
],
"@rules_rust//rust/platform:i686-unknown-freebsd": [
- "std",
+ "std", # i686-unknown-freebsd
],
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [
- "std",
+ "std", # i686-unknown-linux-gnu
],
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [
- "std",
+ "std", # powerpc-unknown-linux-gnu
],
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [
- "std",
+ "std", # s390x-unknown-linux-gnu
],
"@rules_rust//rust/platform:wasm32-wasi": [
- "std",
+ "std", # wasm32-wasi
],
"@rules_rust//rust/platform:x86_64-apple-darwin": [
- "std",
+ "std", # x86_64-apple-darwin
],
"@rules_rust//rust/platform:x86_64-apple-ios": [
- "std",
+ "std", # x86_64-apple-ios
],
"@rules_rust//rust/platform:x86_64-fuchsia": [
- "std",
+ "std", # x86_64-fuchsia
],
"@rules_rust//rust/platform:x86_64-linux-android": [
- "std",
+ "std", # x86_64-linux-android
],
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [
- "std",
+ "std", # x86_64-unknown-freebsd
],
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [
- "std",
+ "std", # x86_64-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [
- "std",
+ "std", # x86_64-unknown-nixos-gnu
],
"//conditions:default": [],
}),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=bitflags",
diff --git a/crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.4.bazel b/crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.4.bazel
index 51877f5..2b99368 100644
--- a/crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=block-buffer",
diff --git a/crate_universe/3rdparty/crates/BUILD.bstr-1.6.0.bazel b/crate_universe/3rdparty/crates/BUILD.bstr-1.6.0.bazel
index 3af437a..dfa4cd9 100644
--- a/crate_universe/3rdparty/crates/BUILD.bstr-1.6.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.bstr-1.6.0.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=bstr",
diff --git a/crate_universe/3rdparty/crates/BUILD.btoi-0.4.3.bazel b/crate_universe/3rdparty/crates/BUILD.btoi-0.4.3.bazel
index 9549979..38b6bb3 100644
--- a/crate_universe/3rdparty/crates/BUILD.btoi-0.4.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.btoi-0.4.3.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=btoi",
diff --git a/crate_universe/3rdparty/crates/BUILD.bumpalo-3.13.0.bazel b/crate_universe/3rdparty/crates/BUILD.bumpalo-3.13.0.bazel
index 667ea16..e8be908 100644
--- a/crate_universe/3rdparty/crates/BUILD.bumpalo-3.13.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.bumpalo-3.13.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=bumpalo",
diff --git a/crate_universe/3rdparty/crates/BUILD.byteyarn-0.2.3.bazel b/crate_universe/3rdparty/crates/BUILD.byteyarn-0.2.3.bazel
index 02ca741..689bf2c 100644
--- a/crate_universe/3rdparty/crates/BUILD.byteyarn-0.2.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.byteyarn-0.2.3.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=byteyarn",
diff --git a/crate_universe/3rdparty/crates/BUILD.camino-1.1.6.bazel b/crate_universe/3rdparty/crates/BUILD.camino-1.1.6.bazel
index 4b543f7..f066502 100644
--- a/crate_universe/3rdparty/crates/BUILD.camino-1.1.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.camino-1.1.6.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=camino",
diff --git a/crate_universe/3rdparty/crates/BUILD.cargo-lock-9.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.cargo-lock-9.0.0.bazel
index 90a7adf..6d2ef08 100644
--- a/crate_universe/3rdparty/crates/BUILD.cargo-lock-9.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cargo-lock-9.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cargo-lock",
diff --git a/crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.4.bazel
index 9f2c0e2..6e763d8 100644
--- a/crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cargo-platform",
diff --git a/crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.18.1.bazel b/crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.18.1.bazel
index 0c85956..eb79cf1 100644
--- a/crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.18.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.18.1.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cargo_metadata",
diff --git a/crate_universe/3rdparty/crates/BUILD.cargo_toml-0.17.1.bazel b/crate_universe/3rdparty/crates/BUILD.cargo_toml-0.17.1.bazel
index d9d5d6c..29b96b8 100644
--- a/crate_universe/3rdparty/crates/BUILD.cargo_toml-0.17.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cargo_toml-0.17.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/cargo_toml.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cargo_toml",
diff --git a/crate_universe/3rdparty/crates/BUILD.cc-1.0.79.bazel b/crate_universe/3rdparty/crates/BUILD.cc-1.0.79.bazel
index c5079b7..6054975 100644
--- a/crate_universe/3rdparty/crates/BUILD.cc-1.0.79.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cc-1.0.79.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cc",
diff --git a/crate_universe/3rdparty/crates/BUILD.cfg-expr-0.15.5.bazel b/crate_universe/3rdparty/crates/BUILD.cfg-expr-0.15.5.bazel
index 6f94b69..c5e53c2 100644
--- a/crate_universe/3rdparty/crates/BUILD.cfg-expr-0.15.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cfg-expr-0.15.5.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cfg-expr",
diff --git a/crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel
index a453c31..81cfe3a 100644
--- a/crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cfg-if",
diff --git a/crate_universe/3rdparty/crates/BUILD.chrono-0.4.26.bazel b/crate_universe/3rdparty/crates/BUILD.chrono-0.4.26.bazel
index 502600a..887f9db 100644
--- a/crate_universe/3rdparty/crates/BUILD.chrono-0.4.26.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.chrono-0.4.26.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=chrono",
diff --git a/crate_universe/3rdparty/crates/BUILD.chrono-tz-0.8.4.bazel b/crate_universe/3rdparty/crates/BUILD.chrono-tz-0.8.4.bazel
index 95be5bb..57cbc2b 100644
--- a/crate_universe/3rdparty/crates/BUILD.chrono-tz-0.8.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.chrono-tz-0.8.4.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=chrono-tz",
diff --git a/crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.2.1.bazel b/crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.2.1.bazel
index 208c247..10f68ee 100644
--- a/crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.2.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.2.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=chrono-tz-build",
diff --git a/crate_universe/3rdparty/crates/BUILD.clap-4.3.11.bazel b/crate_universe/3rdparty/crates/BUILD.clap-4.3.11.bazel
index 3f9970b..725f6e3 100644
--- a/crate_universe/3rdparty/crates/BUILD.clap-4.3.11.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.clap-4.3.11.bazel
@@ -44,7 +44,9 @@
proc_macro_deps = [
"@cui__clap_derive-4.3.2//:clap_derive",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=clap",
diff --git a/crate_universe/3rdparty/crates/BUILD.clap_builder-4.3.11.bazel b/crate_universe/3rdparty/crates/BUILD.clap_builder-4.3.11.bazel
index 72aa9d5..8b5a5c7 100644
--- a/crate_universe/3rdparty/crates/BUILD.clap_builder-4.3.11.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.clap_builder-4.3.11.bazel
@@ -39,7 +39,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=clap_builder",
diff --git a/crate_universe/3rdparty/crates/BUILD.clap_derive-4.3.2.bazel b/crate_universe/3rdparty/crates/BUILD.clap_derive-4.3.2.bazel
index 4f23c7d..79beae4 100644
--- a/crate_universe/3rdparty/crates/BUILD.clap_derive-4.3.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.clap_derive-4.3.2.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=clap_derive",
diff --git a/crate_universe/3rdparty/crates/BUILD.clap_lex-0.5.0.bazel b/crate_universe/3rdparty/crates/BUILD.clap_lex-0.5.0.bazel
index 457c01b..0eb88da 100644
--- a/crate_universe/3rdparty/crates/BUILD.clap_lex-0.5.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.clap_lex-0.5.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=clap_lex",
diff --git a/crate_universe/3rdparty/crates/BUILD.clru-0.6.1.bazel b/crate_universe/3rdparty/crates/BUILD.clru-0.6.1.bazel
index 3e00fd9..995a570 100644
--- a/crate_universe/3rdparty/crates/BUILD.clru-0.6.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.clru-0.6.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=clru",
diff --git a/crate_universe/3rdparty/crates/BUILD.colorchoice-1.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.colorchoice-1.0.0.bazel
index 125595c..551ef18 100644
--- a/crate_universe/3rdparty/crates/BUILD.colorchoice-1.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.colorchoice-1.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=colorchoice",
diff --git a/crate_universe/3rdparty/crates/BUILD.core-foundation-sys-0.8.4.bazel b/crate_universe/3rdparty/crates/BUILD.core-foundation-sys-0.8.4.bazel
index e2c51d4..22fb5b2 100644
--- a/crate_universe/3rdparty/crates/BUILD.core-foundation-sys-0.8.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.core-foundation-sys-0.8.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=core-foundation-sys",
diff --git a/crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.9.bazel b/crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.9.bazel
index b08fc95..f7501a2 100644
--- a/crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.9.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.9.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=cpufeatures",
diff --git a/crate_universe/3rdparty/crates/BUILD.crates-index-2.2.0.bazel b/crate_universe/3rdparty/crates/BUILD.crates-index-2.2.0.bazel
index e05b8d6..494de94 100644
--- a/crate_universe/3rdparty/crates/BUILD.crates-index-2.2.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crates-index-2.2.0.bazel
@@ -36,7 +36,9 @@
proc_macro_deps = [
"@cui__serde_derive-1.0.190//:serde_derive",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crates-index",
diff --git a/crate_universe/3rdparty/crates/BUILD.crc32fast-1.3.2.bazel b/crate_universe/3rdparty/crates/BUILD.crc32fast-1.3.2.bazel
index 820f06d..257d82f 100644
--- a/crate_universe/3rdparty/crates/BUILD.crc32fast-1.3.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crc32fast-1.3.2.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crc32fast",
diff --git a/crate_universe/3rdparty/crates/BUILD.crossbeam-0.8.2.bazel b/crate_universe/3rdparty/crates/BUILD.crossbeam-0.8.2.bazel
index 10de3d0..ec9b096 100644
--- a/crate_universe/3rdparty/crates/BUILD.crossbeam-0.8.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crossbeam-0.8.2.bazel
@@ -39,7 +39,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crossbeam",
diff --git a/crate_universe/3rdparty/crates/BUILD.crossbeam-channel-0.5.8.bazel b/crate_universe/3rdparty/crates/BUILD.crossbeam-channel-0.5.8.bazel
index b3df406..69b4b42 100644
--- a/crate_universe/3rdparty/crates/BUILD.crossbeam-channel-0.5.8.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crossbeam-channel-0.5.8.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crossbeam-channel",
diff --git a/crate_universe/3rdparty/crates/BUILD.crossbeam-deque-0.8.3.bazel b/crate_universe/3rdparty/crates/BUILD.crossbeam-deque-0.8.3.bazel
index 20a18ad..b8e7500 100644
--- a/crate_universe/3rdparty/crates/BUILD.crossbeam-deque-0.8.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crossbeam-deque-0.8.3.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crossbeam-deque",
diff --git a/crate_universe/3rdparty/crates/BUILD.crossbeam-epoch-0.9.15.bazel b/crate_universe/3rdparty/crates/BUILD.crossbeam-epoch-0.9.15.bazel
index b1184de..1bb7b8a 100644
--- a/crate_universe/3rdparty/crates/BUILD.crossbeam-epoch-0.9.15.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crossbeam-epoch-0.9.15.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crossbeam-epoch",
diff --git a/crate_universe/3rdparty/crates/BUILD.crossbeam-queue-0.3.8.bazel b/crate_universe/3rdparty/crates/BUILD.crossbeam-queue-0.3.8.bazel
index e46f9a1..1001a3f 100644
--- a/crate_universe/3rdparty/crates/BUILD.crossbeam-queue-0.3.8.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crossbeam-queue-0.3.8.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crossbeam-queue",
diff --git a/crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.16.bazel b/crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.16.bazel
index ebced6c..ddf2a0e 100644
--- a/crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.16.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.16.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crossbeam-utils",
diff --git a/crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.6.bazel b/crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.6.bazel
index c93ec72..f9f43de 100644
--- a/crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.6.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=crypto-common",
diff --git a/crate_universe/3rdparty/crates/BUILD.deranged-0.3.9.bazel b/crate_universe/3rdparty/crates/BUILD.deranged-0.3.9.bazel
index 263ff4b..c0e4ed1 100644
--- a/crate_universe/3rdparty/crates/BUILD.deranged-0.3.9.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.deranged-0.3.9.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=deranged",
diff --git a/crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel b/crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel
index 88853c0..c45877e 100644
--- a/crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=deunicode",
diff --git a/crate_universe/3rdparty/crates/BUILD.digest-0.10.7.bazel b/crate_universe/3rdparty/crates/BUILD.digest-0.10.7.bazel
index 3000227..25029d2 100644
--- a/crate_universe/3rdparty/crates/BUILD.digest-0.10.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.digest-0.10.7.bazel
@@ -37,7 +37,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=digest",
diff --git a/crate_universe/3rdparty/crates/BUILD.dunce-1.0.4.bazel b/crate_universe/3rdparty/crates/BUILD.dunce-1.0.4.bazel
index 10e89cf..bbe04d4 100644
--- a/crate_universe/3rdparty/crates/BUILD.dunce-1.0.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.dunce-1.0.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=dunce",
diff --git a/crate_universe/3rdparty/crates/BUILD.either-1.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.either-1.9.0.bazel
index c671cf9..d052f1d 100644
--- a/crate_universe/3rdparty/crates/BUILD.either-1.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.either-1.9.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=either",
diff --git a/crate_universe/3rdparty/crates/BUILD.encoding_rs-0.8.33.bazel b/crate_universe/3rdparty/crates/BUILD.encoding_rs-0.8.33.bazel
index 4807e21..e4d2dcf 100644
--- a/crate_universe/3rdparty/crates/BUILD.encoding_rs-0.8.33.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.encoding_rs-0.8.33.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=encoding_rs",
diff --git a/crate_universe/3rdparty/crates/BUILD.equivalent-1.0.1.bazel b/crate_universe/3rdparty/crates/BUILD.equivalent-1.0.1.bazel
index 32b44a2..0ae0dbb 100644
--- a/crate_universe/3rdparty/crates/BUILD.equivalent-1.0.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.equivalent-1.0.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=equivalent",
diff --git a/crate_universe/3rdparty/crates/BUILD.errno-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.errno-0.3.1.bazel
index 829405a..882fe1d 100644
--- a/crate_universe/3rdparty/crates/BUILD.errno-0.3.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.errno-0.3.1.bazel
@@ -30,64 +30,66 @@
),
crate_features = select({
"@rules_rust//rust/platform:aarch64-apple-darwin": [
- "std",
+ "std", # aarch64-apple-darwin
],
"@rules_rust//rust/platform:aarch64-apple-ios": [
- "std",
+ "std", # aarch64-apple-ios
],
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [
- "std",
+ "std", # aarch64-apple-ios-sim
],
"@rules_rust//rust/platform:aarch64-fuchsia": [
- "std",
+ "std", # aarch64-fuchsia
],
"@rules_rust//rust/platform:aarch64-linux-android": [
- "std",
+ "std", # aarch64-linux-android
],
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [
- "std",
+ "std", # aarch64-unknown-nto-qnx710
],
"@rules_rust//rust/platform:armv7-linux-androideabi": [
- "std",
+ "std", # armv7-linux-androideabi
],
"@rules_rust//rust/platform:i686-apple-darwin": [
- "std",
+ "std", # i686-apple-darwin
],
"@rules_rust//rust/platform:i686-linux-android": [
- "std",
+ "std", # i686-linux-android
],
"@rules_rust//rust/platform:i686-unknown-freebsd": [
- "std",
+ "std", # i686-unknown-freebsd
],
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [
- "std",
+ "std", # powerpc-unknown-linux-gnu
],
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [
- "std",
+ "std", # s390x-unknown-linux-gnu
],
"@rules_rust//rust/platform:wasm32-wasi": [
- "std",
+ "std", # wasm32-wasi
],
"@rules_rust//rust/platform:x86_64-apple-darwin": [
- "std",
+ "std", # x86_64-apple-darwin
],
"@rules_rust//rust/platform:x86_64-apple-ios": [
- "std",
+ "std", # x86_64-apple-ios
],
"@rules_rust//rust/platform:x86_64-fuchsia": [
- "std",
+ "std", # x86_64-fuchsia
],
"@rules_rust//rust/platform:x86_64-linux-android": [
- "std",
+ "std", # x86_64-linux-android
],
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [
- "std",
+ "std", # x86_64-unknown-freebsd
],
"//conditions:default": [],
}),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=errno",
diff --git a/crate_universe/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel b/crate_universe/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel
index c552c13..647b4c7 100644
--- a/crate_universe/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=errno-dragonfly",
diff --git a/crate_universe/3rdparty/crates/BUILD.faster-hex-0.8.1.bazel b/crate_universe/3rdparty/crates/BUILD.faster-hex-0.8.1.bazel
index 48b596a..c0a2caf 100644
--- a/crate_universe/3rdparty/crates/BUILD.faster-hex-0.8.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.faster-hex-0.8.1.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=faster-hex",
diff --git a/crate_universe/3rdparty/crates/BUILD.fastrand-2.0.1.bazel b/crate_universe/3rdparty/crates/BUILD.fastrand-2.0.1.bazel
index 7dc1a17..2b59cba 100644
--- a/crate_universe/3rdparty/crates/BUILD.fastrand-2.0.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.fastrand-2.0.1.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=fastrand",
diff --git a/crate_universe/3rdparty/crates/BUILD.filetime-0.2.22.bazel b/crate_universe/3rdparty/crates/BUILD.filetime-0.2.22.bazel
index f3d9731..1b8b86c 100644
--- a/crate_universe/3rdparty/crates/BUILD.filetime-0.2.22.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.filetime-0.2.22.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=filetime",
diff --git a/crate_universe/3rdparty/crates/BUILD.flate2-1.0.28.bazel b/crate_universe/3rdparty/crates/BUILD.flate2-1.0.28.bazel
index 9a9b669..186f0d4 100644
--- a/crate_universe/3rdparty/crates/BUILD.flate2-1.0.28.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.flate2-1.0.28.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=flate2",
diff --git a/crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel b/crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel
index 67cfbc6..03bc768 100644
--- a/crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel
@@ -34,7 +34,9 @@
],
crate_root = "lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=fnv",
diff --git a/crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.2.0.bazel b/crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.2.0.bazel
index 0978d58..825db55 100644
--- a/crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.2.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.2.0.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=form_urlencoded",
diff --git a/crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel b/crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel
index 391769e..ee0440a 100644
--- a/crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel
@@ -26,7 +26,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=fuchsia-cprng",
diff --git a/crate_universe/3rdparty/crates/BUILD.generic-array-0.14.7.bazel b/crate_universe/3rdparty/crates/BUILD.generic-array-0.14.7.bazel
index 22596cf..2a2eaaf 100644
--- a/crate_universe/3rdparty/crates/BUILD.generic-array-0.14.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.generic-array-0.14.7.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=generic-array",
diff --git a/crate_universe/3rdparty/crates/BUILD.getrandom-0.2.10.bazel b/crate_universe/3rdparty/crates/BUILD.getrandom-0.2.10.bazel
index b5ae8cc..ab2abe8 100644
--- a/crate_universe/3rdparty/crates/BUILD.getrandom-0.2.10.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.getrandom-0.2.10.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=getrandom",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-0.54.1.bazel b/crate_universe/3rdparty/crates/BUILD.gix-0.54.1.bazel
index 2a0fef7..abfbe1e 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-0.54.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-0.54.1.bazel
@@ -45,7 +45,9 @@
proc_macro_deps = [
"@cui__gix-macros-0.1.0//:gix_macros",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-actor-0.27.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-actor-0.27.0.bazel
index e4bb9e8..2ce643c 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-actor-0.27.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-actor-0.27.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-actor",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-attributes-0.19.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-attributes-0.19.0.bazel
index 9a5e35d..8178883 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-attributes-0.19.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-attributes-0.19.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-attributes",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-bitmap-0.2.7.bazel b/crate_universe/3rdparty/crates/BUILD.gix-bitmap-0.2.7.bazel
index 8c6f344..9904d65 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-bitmap-0.2.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-bitmap-0.2.7.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-bitmap",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-chunk-0.4.4.bazel b/crate_universe/3rdparty/crates/BUILD.gix-chunk-0.4.4.bazel
index b84be4e..f8d9b81 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-chunk-0.4.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-chunk-0.4.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-chunk",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-command-0.2.10.bazel b/crate_universe/3rdparty/crates/BUILD.gix-command-0.2.10.bazel
index 39be380..12437ab 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-command-0.2.10.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-command-0.2.10.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-command",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-commitgraph-0.21.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-commitgraph-0.21.0.bazel
index 3274611..1f65272 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-commitgraph-0.21.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-commitgraph-0.21.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-commitgraph",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-config-0.30.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-config-0.30.0.bazel
index 0a47c7e..ba111e6 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-config-0.30.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-config-0.30.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-config",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-config-value-0.14.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-config-value-0.14.0.bazel
index b060a75..c562da2 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-config-value-0.14.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-config-value-0.14.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-config-value",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-credentials-0.20.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-credentials-0.20.0.bazel
index 534c5c3..a180f9b 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-credentials-0.20.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-credentials-0.20.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-credentials",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-date-0.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-date-0.8.0.bazel
index 3b1bdf6..3284efb 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-date-0.8.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-date-0.8.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-date",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-diff-0.36.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-diff-0.36.0.bazel
index fbe23e4..6c49ba7 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-diff-0.36.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-diff-0.36.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-diff",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-discover-0.25.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-discover-0.25.0.bazel
index ad6af09..c8032e4 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-discover-0.25.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-discover-0.25.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-discover",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-features-0.35.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-features-0.35.0.bazel
index 3d3db86..e99e68d 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-features-0.35.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-features-0.35.0.bazel
@@ -42,7 +42,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-features",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-filter-0.5.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-filter-0.5.0.bazel
index 46e9889..b937ec3 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-filter-0.5.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-filter-0.5.0.bazel
@@ -33,7 +33,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-filter",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-fs-0.7.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-fs-0.7.0.bazel
index 37dce6b..604000e 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-fs-0.7.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-fs-0.7.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-fs",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-glob-0.13.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-glob-0.13.0.bazel
index ea1a822..f6ebae7 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-glob-0.13.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-glob-0.13.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-glob",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-hash-0.13.1.bazel b/crate_universe/3rdparty/crates/BUILD.gix-hash-0.13.1.bazel
index 0185a73..27bda71 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-hash-0.13.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-hash-0.13.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-hash",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-hashtable-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-hashtable-0.4.0.bazel
index af64609..6303b9d 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-hashtable-0.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-hashtable-0.4.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-hashtable",
@@ -78,7 +80,7 @@
version = "0.4.0",
deps = [
"@cui__gix-hash-0.13.1//:gix_hash",
- "@cui__hashbrown-0.14.0//:hashbrown",
+ "@cui__hashbrown-0.14.3//:hashbrown",
"@cui__parking_lot-0.12.1//:parking_lot",
],
)
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-ignore-0.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-ignore-0.8.0.bazel
index a24cb2b..39ce94d 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-ignore-0.8.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-ignore-0.8.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-ignore",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-index-0.25.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-index-0.25.0.bazel
index d8a8745..588a218 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-index-0.25.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-index-0.25.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-index",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-lock-10.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-lock-10.0.0.bazel
index 1984ea1..48d4a17 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-lock-10.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-lock-10.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-lock",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-macros-0.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-macros-0.1.0.bazel
index 66309e9..fafa894 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-macros-0.1.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-macros-0.1.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-macros",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-negotiate-0.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-negotiate-0.8.0.bazel
index 3e96c76..5e35d50 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-negotiate-0.8.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-negotiate-0.8.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-negotiate",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-object-0.37.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-object-0.37.0.bazel
index 469c751..f365212 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-object-0.37.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-object-0.37.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-object",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-odb-0.53.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-odb-0.53.0.bazel
index 3153248..be5a6c6 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-odb-0.53.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-odb-0.53.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-odb",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-pack-0.43.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-pack-0.43.0.bazel
index 869580a..f660ede 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-pack-0.43.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-pack-0.43.0.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-pack",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-packetline-0.16.7.bazel b/crate_universe/3rdparty/crates/BUILD.gix-packetline-0.16.7.bazel
index 917a0bd..b531af1 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-packetline-0.16.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-packetline-0.16.7.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-packetline",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-packetline-blocking-0.16.6.bazel b/crate_universe/3rdparty/crates/BUILD.gix-packetline-blocking-0.16.6.bazel
index 05d62bd..6a4f576 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-packetline-blocking-0.16.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-packetline-blocking-0.16.6.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-packetline-blocking",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-path-0.10.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-path-0.10.0.bazel
index 68bb546..e096328 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-path-0.10.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-path-0.10.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-path",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-pathspec-0.3.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-pathspec-0.3.0.bazel
index d12b847..66d3dce 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-pathspec-0.3.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-pathspec-0.3.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-pathspec",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-prompt-0.7.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-prompt-0.7.0.bazel
index ef8e4f0..1ae6cf9 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-prompt-0.7.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-prompt-0.7.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-prompt",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-protocol-0.40.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-protocol-0.40.0.bazel
index 7a3b1b1..652a318 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-protocol-0.40.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-protocol-0.40.0.bazel
@@ -36,7 +36,9 @@
proc_macro_deps = [
"@cui__maybe-async-0.2.7//:maybe_async",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-protocol",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-quote-0.4.7.bazel b/crate_universe/3rdparty/crates/BUILD.gix-quote-0.4.7.bazel
index bbb1e4a..3b873cc 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-quote-0.4.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-quote-0.4.7.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-quote",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-ref-0.37.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-ref-0.37.0.bazel
index 1448b66..2882d5e 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-ref-0.37.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-ref-0.37.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-ref",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-refspec-0.18.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-refspec-0.18.0.bazel
index 71296fa..badf797 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-refspec-0.18.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-refspec-0.18.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-refspec",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-revision-0.22.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-revision-0.22.0.bazel
index 6733e04..392d385 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-revision-0.22.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-revision-0.22.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-revision",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-revwalk-0.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-revwalk-0.8.0.bazel
index 14f7b44..a6a758e 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-revwalk-0.8.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-revwalk-0.8.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-revwalk",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-sec-0.10.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-sec-0.10.0.bazel
index 023389c..dbae304 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-sec-0.10.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-sec-0.10.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-sec",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-submodule-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-submodule-0.4.0.bazel
index aa47067..1c0fa3a 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-submodule-0.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-submodule-0.4.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-submodule",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-tempfile-10.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-tempfile-10.0.0.bazel
index 357041f..a34b2a9 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-tempfile-10.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-tempfile-10.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-tempfile",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-trace-0.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.gix-trace-0.1.3.bazel
index d1de2a4..55af1c7 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-trace-0.1.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-trace-0.1.3.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-trace",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-transport-0.37.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-transport-0.37.0.bazel
index c892878..e271c6b 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-transport-0.37.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-transport-0.37.0.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-transport",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-traverse-0.33.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-traverse-0.33.0.bazel
index f441862..cac3e99 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-traverse-0.33.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-traverse-0.33.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-traverse",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-url-0.24.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-url-0.24.0.bazel
index 81fdca3..04e14fb 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-url-0.24.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-url-0.24.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-url",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-utils-0.1.5.bazel b/crate_universe/3rdparty/crates/BUILD.gix-utils-0.1.5.bazel
index 4e38ad9..72fc26e 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-utils-0.1.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-utils-0.1.5.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-utils",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-validate-0.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-validate-0.8.0.bazel
index ec36382..bb46a92 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-validate-0.8.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-validate-0.8.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-validate",
diff --git a/crate_universe/3rdparty/crates/BUILD.gix-worktree-0.26.0.bazel b/crate_universe/3rdparty/crates/BUILD.gix-worktree-0.26.0.bazel
index b0db7fc..a521ddb 100644
--- a/crate_universe/3rdparty/crates/BUILD.gix-worktree-0.26.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.gix-worktree-0.26.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=gix-worktree",
diff --git a/crate_universe/3rdparty/crates/BUILD.globset-0.4.11.bazel b/crate_universe/3rdparty/crates/BUILD.globset-0.4.11.bazel
index a64a329..5af9af9 100644
--- a/crate_universe/3rdparty/crates/BUILD.globset-0.4.11.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.globset-0.4.11.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=globset",
diff --git a/crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel b/crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel
index 55f90b3..95e04b8 100644
--- a/crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=globwalk",
diff --git a/crate_universe/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel b/crate_universe/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel
index 7bd20e4..5c25f9e 100644
--- a/crate_universe/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=hashbrown",
diff --git a/crate_universe/3rdparty/crates/BUILD.hashbrown-0.14.0.bazel b/crate_universe/3rdparty/crates/BUILD.hashbrown-0.14.3.bazel
similarity index 97%
rename from crate_universe/3rdparty/crates/BUILD.hashbrown-0.14.0.bazel
rename to crate_universe/3rdparty/crates/BUILD.hashbrown-0.14.3.bazel
index 3f397c0..aa1bf21 100644
--- a/crate_universe/3rdparty/crates/BUILD.hashbrown-0.14.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.hashbrown-0.14.3.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=hashbrown",
@@ -79,5 +81,5 @@
"@rules_rust//rust/platform:x86_64-unknown-none": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
- version = "0.14.0",
+ version = "0.14.3",
)
diff --git a/crate_universe/3rdparty/crates/BUILD.heck-0.4.1.bazel b/crate_universe/3rdparty/crates/BUILD.heck-0.4.1.bazel
index d2b0ec5..83f60ec 100644
--- a/crate_universe/3rdparty/crates/BUILD.heck-0.4.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.heck-0.4.1.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=heck",
diff --git a/crate_universe/3rdparty/crates/BUILD.hermit-abi-0.3.2.bazel b/crate_universe/3rdparty/crates/BUILD.hermit-abi-0.3.2.bazel
index 040ee60..589752d 100644
--- a/crate_universe/3rdparty/crates/BUILD.hermit-abi-0.3.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.hermit-abi-0.3.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=hermit-abi",
diff --git a/crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel b/crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel
index 7eb02cf..3d88488 100644
--- a/crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=hex",
diff --git a/crate_universe/3rdparty/crates/BUILD.home-0.5.5.bazel b/crate_universe/3rdparty/crates/BUILD.home-0.5.5.bazel
index aeea0b9..0db7093 100644
--- a/crate_universe/3rdparty/crates/BUILD.home-0.5.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.home-0.5.5.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=home",
diff --git a/crate_universe/3rdparty/crates/BUILD.humansize-2.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.humansize-2.1.3.bazel
index a451bd5..57eba7d 100644
--- a/crate_universe/3rdparty/crates/BUILD.humansize-2.1.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.humansize-2.1.3.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=humansize",
diff --git a/crate_universe/3rdparty/crates/BUILD.iana-time-zone-0.1.57.bazel b/crate_universe/3rdparty/crates/BUILD.iana-time-zone-0.1.57.bazel
index 25e8e12..38b3564 100644
--- a/crate_universe/3rdparty/crates/BUILD.iana-time-zone-0.1.57.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.iana-time-zone-0.1.57.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=iana-time-zone",
diff --git a/crate_universe/3rdparty/crates/BUILD.iana-time-zone-haiku-0.1.2.bazel b/crate_universe/3rdparty/crates/BUILD.iana-time-zone-haiku-0.1.2.bazel
index a062c27..2f148a1 100644
--- a/crate_universe/3rdparty/crates/BUILD.iana-time-zone-haiku-0.1.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.iana-time-zone-haiku-0.1.2.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=iana-time-zone-haiku",
diff --git a/crate_universe/3rdparty/crates/BUILD.idna-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.idna-0.4.0.bazel
index 1ba616e..9ee682b 100644
--- a/crate_universe/3rdparty/crates/BUILD.idna-0.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.idna-0.4.0.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=idna",
diff --git a/crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel b/crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel
index 8660390..bda4701 100644
--- a/crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=ignore",
diff --git a/crate_universe/3rdparty/crates/BUILD.indexmap-2.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.indexmap-2.1.0.bazel
similarity index 96%
rename from crate_universe/3rdparty/crates/BUILD.indexmap-2.0.0.bazel
rename to crate_universe/3rdparty/crates/BUILD.indexmap-2.1.0.bazel
index 6affd68..080c798 100644
--- a/crate_universe/3rdparty/crates/BUILD.indexmap-2.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.indexmap-2.1.0.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=indexmap",
@@ -79,9 +81,9 @@
"@rules_rust//rust/platform:x86_64-unknown-none": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
- version = "2.0.0",
+ version = "2.1.0",
deps = [
"@cui__equivalent-1.0.1//:equivalent",
- "@cui__hashbrown-0.14.0//:hashbrown",
+ "@cui__hashbrown-0.14.3//:hashbrown",
],
)
diff --git a/crate_universe/3rdparty/crates/BUILD.indoc-2.0.4.bazel b/crate_universe/3rdparty/crates/BUILD.indoc-2.0.4.bazel
index a88deff..757643b 100644
--- a/crate_universe/3rdparty/crates/BUILD.indoc-2.0.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.indoc-2.0.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=indoc",
diff --git a/crate_universe/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel b/crate_universe/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel
index 0317f22..9e24c84 100644
--- a/crate_universe/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel
@@ -38,7 +38,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=io-lifetimes",
diff --git a/crate_universe/3rdparty/crates/BUILD.is-terminal-0.4.7.bazel b/crate_universe/3rdparty/crates/BUILD.is-terminal-0.4.7.bazel
index 55b8bf0..6ccd0f1 100644
--- a/crate_universe/3rdparty/crates/BUILD.is-terminal-0.4.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.is-terminal-0.4.7.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=is-terminal",
diff --git a/crate_universe/3rdparty/crates/BUILD.itertools-0.11.0.bazel b/crate_universe/3rdparty/crates/BUILD.itertools-0.11.0.bazel
index ca6950b..c80e900 100644
--- a/crate_universe/3rdparty/crates/BUILD.itertools-0.11.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.itertools-0.11.0.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=itertools",
diff --git a/crate_universe/3rdparty/crates/BUILD.itoa-1.0.8.bazel b/crate_universe/3rdparty/crates/BUILD.itoa-1.0.8.bazel
index b2b3a46..e0dfa70 100644
--- a/crate_universe/3rdparty/crates/BUILD.itoa-1.0.8.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.itoa-1.0.8.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=itoa",
diff --git a/crate_universe/3rdparty/crates/BUILD.js-sys-0.3.64.bazel b/crate_universe/3rdparty/crates/BUILD.js-sys-0.3.64.bazel
index 54183ca..42536c0 100644
--- a/crate_universe/3rdparty/crates/BUILD.js-sys-0.3.64.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.js-sys-0.3.64.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=js-sys",
diff --git a/crate_universe/3rdparty/crates/BUILD.jwalk-0.8.1.bazel b/crate_universe/3rdparty/crates/BUILD.jwalk-0.8.1.bazel
index 39ca6fa..a2523f6 100644
--- a/crate_universe/3rdparty/crates/BUILD.jwalk-0.8.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.jwalk-0.8.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=jwalk",
diff --git a/crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel
index f9c47b7..939a69f 100644
--- a/crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=lazy_static",
diff --git a/crate_universe/3rdparty/crates/BUILD.libc-0.2.149.bazel b/crate_universe/3rdparty/crates/BUILD.libc-0.2.149.bazel
index ad53428..9d77b1f 100644
--- a/crate_universe/3rdparty/crates/BUILD.libc-0.2.149.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.libc-0.2.149.bazel
@@ -31,164 +31,166 @@
),
crate_features = select({
"@rules_rust//rust/platform:aarch64-apple-darwin": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-apple-darwin
+ "extra_traits", # aarch64-apple-darwin
+ "std", # aarch64-apple-darwin
],
"@rules_rust//rust/platform:aarch64-apple-ios": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-apple-ios
+ "extra_traits", # aarch64-apple-ios
+ "std", # aarch64-apple-ios
],
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-apple-ios-sim
+ "extra_traits", # aarch64-apple-ios-sim
+ "std", # aarch64-apple-ios-sim
],
"@rules_rust//rust/platform:aarch64-fuchsia": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-fuchsia
+ "extra_traits", # aarch64-fuchsia
+ "std", # aarch64-fuchsia
],
"@rules_rust//rust/platform:aarch64-linux-android": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-linux-android
+ "extra_traits", # aarch64-linux-android
+ "std", # aarch64-linux-android
],
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-unknown-linux-gnu
+ "extra_traits", # aarch64-unknown-linux-gnu
+ "std", # aarch64-unknown-linux-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-unknown-nixos-gnu
+ "extra_traits", # aarch64-unknown-nixos-gnu
+ "std", # aarch64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-unknown-nto-qnx710
+ "extra_traits", # aarch64-unknown-nto-qnx710
+ "std", # aarch64-unknown-nto-qnx710
],
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # arm-unknown-linux-gnueabi
+ "extra_traits", # arm-unknown-linux-gnueabi
+ "std", # arm-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:armv7-linux-androideabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # armv7-linux-androideabi
+ "extra_traits", # armv7-linux-androideabi
+ "std", # armv7-linux-androideabi
],
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # armv7-unknown-linux-gnueabi
+ "extra_traits", # armv7-unknown-linux-gnueabi
+ "std", # armv7-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:i686-apple-darwin": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-apple-darwin
+ "extra_traits", # i686-apple-darwin
+ "std", # i686-apple-darwin
],
"@rules_rust//rust/platform:i686-linux-android": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-linux-android
+ "extra_traits", # i686-linux-android
+ "std", # i686-linux-android
],
"@rules_rust//rust/platform:i686-unknown-freebsd": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-unknown-freebsd
+ "extra_traits", # i686-unknown-freebsd
+ "std", # i686-unknown-freebsd
],
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-unknown-linux-gnu
+ "extra_traits", # i686-unknown-linux-gnu
+ "std", # i686-unknown-linux-gnu
],
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # powerpc-unknown-linux-gnu
+ "extra_traits", # powerpc-unknown-linux-gnu
+ "std", # powerpc-unknown-linux-gnu
],
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [
- "default",
- "extra_traits",
- "std",
+ "default", # riscv32imc-unknown-none-elf
+ "extra_traits", # riscv32imc-unknown-none-elf
+ "std", # riscv32imc-unknown-none-elf
],
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [
- "default",
- "extra_traits",
- "std",
+ "default", # riscv64gc-unknown-none-elf
+ "extra_traits", # riscv64gc-unknown-none-elf
+ "std", # riscv64gc-unknown-none-elf
],
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # s390x-unknown-linux-gnu
+ "extra_traits", # s390x-unknown-linux-gnu
+ "std", # s390x-unknown-linux-gnu
],
"@rules_rust//rust/platform:thumbv7em-none-eabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # thumbv7em-none-eabi
+ "extra_traits", # thumbv7em-none-eabi
+ "std", # thumbv7em-none-eabi
],
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # thumbv8m.main-none-eabi
+ "extra_traits", # thumbv8m.main-none-eabi
+ "std", # thumbv8m.main-none-eabi
],
"@rules_rust//rust/platform:wasm32-unknown-unknown": [
- "default",
- "std",
+ "default", # wasm32-unknown-unknown
+ "std", # wasm32-unknown-unknown
],
"@rules_rust//rust/platform:wasm32-wasi": [
- "default",
- "extra_traits",
- "std",
+ "default", # wasm32-wasi
+ "extra_traits", # wasm32-wasi
+ "std", # wasm32-wasi
],
"@rules_rust//rust/platform:x86_64-apple-darwin": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-apple-darwin
+ "extra_traits", # x86_64-apple-darwin
+ "std", # x86_64-apple-darwin
],
"@rules_rust//rust/platform:x86_64-apple-ios": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-apple-ios
+ "extra_traits", # x86_64-apple-ios
+ "std", # x86_64-apple-ios
],
"@rules_rust//rust/platform:x86_64-fuchsia": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-fuchsia
+ "extra_traits", # x86_64-fuchsia
+ "std", # x86_64-fuchsia
],
"@rules_rust//rust/platform:x86_64-linux-android": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-linux-android
+ "extra_traits", # x86_64-linux-android
+ "std", # x86_64-linux-android
],
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-freebsd
+ "extra_traits", # x86_64-unknown-freebsd
+ "std", # x86_64-unknown-freebsd
],
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-linux-gnu
+ "extra_traits", # x86_64-unknown-linux-gnu
+ "std", # x86_64-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-nixos-gnu
+ "extra_traits", # x86_64-unknown-nixos-gnu
+ "std", # x86_64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-none": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-none
+ "extra_traits", # x86_64-unknown-none
+ "std", # x86_64-unknown-none
],
"//conditions:default": [],
}),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=libc",
@@ -244,158 +246,158 @@
srcs = glob(["**/*.rs"]),
crate_features = select({
"@rules_rust//rust/platform:aarch64-apple-darwin": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-apple-darwin
+ "extra_traits", # aarch64-apple-darwin
+ "std", # aarch64-apple-darwin
],
"@rules_rust//rust/platform:aarch64-apple-ios": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-apple-ios
+ "extra_traits", # aarch64-apple-ios
+ "std", # aarch64-apple-ios
],
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-apple-ios-sim
+ "extra_traits", # aarch64-apple-ios-sim
+ "std", # aarch64-apple-ios-sim
],
"@rules_rust//rust/platform:aarch64-fuchsia": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-fuchsia
+ "extra_traits", # aarch64-fuchsia
+ "std", # aarch64-fuchsia
],
"@rules_rust//rust/platform:aarch64-linux-android": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-linux-android
+ "extra_traits", # aarch64-linux-android
+ "std", # aarch64-linux-android
],
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-unknown-linux-gnu
+ "extra_traits", # aarch64-unknown-linux-gnu
+ "std", # aarch64-unknown-linux-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-unknown-nixos-gnu
+ "extra_traits", # aarch64-unknown-nixos-gnu
+ "std", # aarch64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [
- "default",
- "extra_traits",
- "std",
+ "default", # aarch64-unknown-nto-qnx710
+ "extra_traits", # aarch64-unknown-nto-qnx710
+ "std", # aarch64-unknown-nto-qnx710
],
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # arm-unknown-linux-gnueabi
+ "extra_traits", # arm-unknown-linux-gnueabi
+ "std", # arm-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:armv7-linux-androideabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # armv7-linux-androideabi
+ "extra_traits", # armv7-linux-androideabi
+ "std", # armv7-linux-androideabi
],
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # armv7-unknown-linux-gnueabi
+ "extra_traits", # armv7-unknown-linux-gnueabi
+ "std", # armv7-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:i686-apple-darwin": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-apple-darwin
+ "extra_traits", # i686-apple-darwin
+ "std", # i686-apple-darwin
],
"@rules_rust//rust/platform:i686-linux-android": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-linux-android
+ "extra_traits", # i686-linux-android
+ "std", # i686-linux-android
],
"@rules_rust//rust/platform:i686-unknown-freebsd": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-unknown-freebsd
+ "extra_traits", # i686-unknown-freebsd
+ "std", # i686-unknown-freebsd
],
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # i686-unknown-linux-gnu
+ "extra_traits", # i686-unknown-linux-gnu
+ "std", # i686-unknown-linux-gnu
],
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # powerpc-unknown-linux-gnu
+ "extra_traits", # powerpc-unknown-linux-gnu
+ "std", # powerpc-unknown-linux-gnu
],
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [
- "default",
- "extra_traits",
- "std",
+ "default", # riscv32imc-unknown-none-elf
+ "extra_traits", # riscv32imc-unknown-none-elf
+ "std", # riscv32imc-unknown-none-elf
],
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [
- "default",
- "extra_traits",
- "std",
+ "default", # riscv64gc-unknown-none-elf
+ "extra_traits", # riscv64gc-unknown-none-elf
+ "std", # riscv64gc-unknown-none-elf
],
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # s390x-unknown-linux-gnu
+ "extra_traits", # s390x-unknown-linux-gnu
+ "std", # s390x-unknown-linux-gnu
],
"@rules_rust//rust/platform:thumbv7em-none-eabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # thumbv7em-none-eabi
+ "extra_traits", # thumbv7em-none-eabi
+ "std", # thumbv7em-none-eabi
],
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [
- "default",
- "extra_traits",
- "std",
+ "default", # thumbv8m.main-none-eabi
+ "extra_traits", # thumbv8m.main-none-eabi
+ "std", # thumbv8m.main-none-eabi
],
"@rules_rust//rust/platform:wasm32-unknown-unknown": [
- "default",
- "std",
+ "default", # wasm32-unknown-unknown
+ "std", # wasm32-unknown-unknown
],
"@rules_rust//rust/platform:wasm32-wasi": [
- "default",
- "extra_traits",
- "std",
+ "default", # wasm32-wasi
+ "extra_traits", # wasm32-wasi
+ "std", # wasm32-wasi
],
"@rules_rust//rust/platform:x86_64-apple-darwin": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-apple-darwin
+ "extra_traits", # x86_64-apple-darwin
+ "std", # x86_64-apple-darwin
],
"@rules_rust//rust/platform:x86_64-apple-ios": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-apple-ios
+ "extra_traits", # x86_64-apple-ios
+ "std", # x86_64-apple-ios
],
"@rules_rust//rust/platform:x86_64-fuchsia": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-fuchsia
+ "extra_traits", # x86_64-fuchsia
+ "std", # x86_64-fuchsia
],
"@rules_rust//rust/platform:x86_64-linux-android": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-linux-android
+ "extra_traits", # x86_64-linux-android
+ "std", # x86_64-linux-android
],
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-freebsd
+ "extra_traits", # x86_64-unknown-freebsd
+ "std", # x86_64-unknown-freebsd
],
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-linux-gnu
+ "extra_traits", # x86_64-unknown-linux-gnu
+ "std", # x86_64-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-nixos-gnu
+ "extra_traits", # x86_64-unknown-nixos-gnu
+ "std", # x86_64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-none": [
- "default",
- "extra_traits",
- "std",
+ "default", # x86_64-unknown-none
+ "extra_traits", # x86_64-unknown-none
+ "std", # x86_64-unknown-none
],
"//conditions:default": [],
}),
diff --git a/crate_universe/3rdparty/crates/BUILD.libm-0.2.7.bazel b/crate_universe/3rdparty/crates/BUILD.libm-0.2.7.bazel
index 70c1d9e..05b3533 100644
--- a/crate_universe/3rdparty/crates/BUILD.libm-0.2.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.libm-0.2.7.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=libm",
diff --git a/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel b/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel
index 1cede14..8e0053f 100644
--- a/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel
@@ -34,31 +34,33 @@
"no_std",
] + select({
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [
- "errno",
+ "errno", # aarch64-unknown-linux-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [
- "errno",
+ "errno", # aarch64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [
- "errno",
+ "errno", # arm-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [
- "errno",
+ "errno", # armv7-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [
- "errno",
+ "errno", # i686-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [
- "errno",
+ "errno", # x86_64-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [
- "errno",
+ "errno", # x86_64-unknown-nixos-gnu
],
"//conditions:default": [],
}),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=linux-raw-sys",
diff --git a/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.4.10.bazel b/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.4.10.bazel
index 69dd15d..692d3e8 100644
--- a/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.4.10.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.linux-raw-sys-0.4.10.bazel
@@ -34,38 +34,40 @@
"no_std",
] + select({
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [
- "elf",
- "errno",
+ "elf", # aarch64-unknown-linux-gnu
+ "errno", # aarch64-unknown-linux-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [
- "elf",
- "errno",
+ "elf", # aarch64-unknown-nixos-gnu
+ "errno", # aarch64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [
- "elf",
- "errno",
+ "elf", # arm-unknown-linux-gnueabi
+ "errno", # arm-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [
- "elf",
- "errno",
+ "elf", # armv7-unknown-linux-gnueabi
+ "errno", # armv7-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [
- "elf",
- "errno",
+ "elf", # i686-unknown-linux-gnu
+ "errno", # i686-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [
- "elf",
- "errno",
+ "elf", # x86_64-unknown-linux-gnu
+ "errno", # x86_64-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [
- "elf",
- "errno",
+ "elf", # x86_64-unknown-nixos-gnu
+ "errno", # x86_64-unknown-nixos-gnu
],
"//conditions:default": [],
}),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=linux-raw-sys",
diff --git a/crate_universe/3rdparty/crates/BUILD.lock_api-0.4.11.bazel b/crate_universe/3rdparty/crates/BUILD.lock_api-0.4.11.bazel
index 58ef6e0..4add9bd 100644
--- a/crate_universe/3rdparty/crates/BUILD.lock_api-0.4.11.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.lock_api-0.4.11.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=lock_api",
diff --git a/crate_universe/3rdparty/crates/BUILD.log-0.4.19.bazel b/crate_universe/3rdparty/crates/BUILD.log-0.4.19.bazel
index 4f2b038..1e09a7b 100644
--- a/crate_universe/3rdparty/crates/BUILD.log-0.4.19.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.log-0.4.19.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=log",
diff --git a/crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel b/crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel
index 6ffc039..265859c 100644
--- a/crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=maplit",
diff --git a/crate_universe/3rdparty/crates/BUILD.maybe-async-0.2.7.bazel b/crate_universe/3rdparty/crates/BUILD.maybe-async-0.2.7.bazel
index ccc5bad..3de9956 100644
--- a/crate_universe/3rdparty/crates/BUILD.maybe-async-0.2.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.maybe-async-0.2.7.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=maybe-async",
diff --git a/crate_universe/3rdparty/crates/BUILD.memchr-2.6.4.bazel b/crate_universe/3rdparty/crates/BUILD.memchr-2.6.4.bazel
index 07fa354..c8bcb14 100644
--- a/crate_universe/3rdparty/crates/BUILD.memchr-2.6.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.memchr-2.6.4.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=memchr",
diff --git a/crate_universe/3rdparty/crates/BUILD.memmap2-0.7.1.bazel b/crate_universe/3rdparty/crates/BUILD.memmap2-0.7.1.bazel
index 5534b49..dbccb3f 100644
--- a/crate_universe/3rdparty/crates/BUILD.memmap2-0.7.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.memmap2-0.7.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=memmap2",
diff --git a/crate_universe/3rdparty/crates/BUILD.memoffset-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.memoffset-0.9.0.bazel
index f44db4e..f7b6103 100644
--- a/crate_universe/3rdparty/crates/BUILD.memoffset-0.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.memoffset-0.9.0.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=memoffset",
diff --git a/crate_universe/3rdparty/crates/BUILD.miniz_oxide-0.7.1.bazel b/crate_universe/3rdparty/crates/BUILD.miniz_oxide-0.7.1.bazel
index 4f05e7e..d728a62 100644
--- a/crate_universe/3rdparty/crates/BUILD.miniz_oxide-0.7.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.miniz_oxide-0.7.1.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=miniz_oxide",
diff --git a/crate_universe/3rdparty/crates/BUILD.normpath-1.1.1.bazel b/crate_universe/3rdparty/crates/BUILD.normpath-1.1.1.bazel
index c526e83..7a4772b 100644
--- a/crate_universe/3rdparty/crates/BUILD.normpath-1.1.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.normpath-1.1.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=normpath",
diff --git a/crate_universe/3rdparty/crates/BUILD.nu-ansi-term-0.46.0.bazel b/crate_universe/3rdparty/crates/BUILD.nu-ansi-term-0.46.0.bazel
index 1275b4f..6f9b89e 100644
--- a/crate_universe/3rdparty/crates/BUILD.nu-ansi-term-0.46.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.nu-ansi-term-0.46.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=nu-ansi-term",
diff --git a/crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel b/crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel
index 6f8d433..0ec6c67 100644
--- a/crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel
@@ -40,7 +40,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num",
diff --git a/crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel b/crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel
index 57130e5..670c1da 100644
--- a/crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num-bigint",
diff --git a/crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel b/crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel
index cccc1d2..12630e5 100644
--- a/crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num-complex",
diff --git a/crate_universe/3rdparty/crates/BUILD.num-integer-0.1.45.bazel b/crate_universe/3rdparty/crates/BUILD.num-integer-0.1.45.bazel
index 7e7d129..c0d4239 100644
--- a/crate_universe/3rdparty/crates/BUILD.num-integer-0.1.45.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num-integer-0.1.45.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num-integer",
diff --git a/crate_universe/3rdparty/crates/BUILD.num-iter-0.1.43.bazel b/crate_universe/3rdparty/crates/BUILD.num-iter-0.1.43.bazel
index 9a81763..61e95f5 100644
--- a/crate_universe/3rdparty/crates/BUILD.num-iter-0.1.43.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num-iter-0.1.43.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num-iter",
diff --git a/crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel b/crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel
index db785de..8d042fc 100644
--- a/crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num-rational",
diff --git a/crate_universe/3rdparty/crates/BUILD.num-traits-0.2.15.bazel b/crate_universe/3rdparty/crates/BUILD.num-traits-0.2.15.bazel
index e34f343..eff305d 100644
--- a/crate_universe/3rdparty/crates/BUILD.num-traits-0.2.15.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num-traits-0.2.15.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num-traits",
diff --git a/crate_universe/3rdparty/crates/BUILD.num_threads-0.1.6.bazel b/crate_universe/3rdparty/crates/BUILD.num_threads-0.1.6.bazel
index d66842e..fda2678 100644
--- a/crate_universe/3rdparty/crates/BUILD.num_threads-0.1.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.num_threads-0.1.6.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=num_threads",
diff --git a/crate_universe/3rdparty/crates/BUILD.once_cell-1.18.0.bazel b/crate_universe/3rdparty/crates/BUILD.once_cell-1.18.0.bazel
index 238333f..7b8d15b 100644
--- a/crate_universe/3rdparty/crates/BUILD.once_cell-1.18.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.once_cell-1.18.0.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=once_cell",
diff --git a/crate_universe/3rdparty/crates/BUILD.overload-0.1.1.bazel b/crate_universe/3rdparty/crates/BUILD.overload-0.1.1.bazel
index cdfda17..31ea574 100644
--- a/crate_universe/3rdparty/crates/BUILD.overload-0.1.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.overload-0.1.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=overload",
diff --git a/crate_universe/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel b/crate_universe/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel
index 3ae9ad1..14580a4 100644
--- a/crate_universe/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=parking_lot",
diff --git a/crate_universe/3rdparty/crates/BUILD.parking_lot_core-0.9.9.bazel b/crate_universe/3rdparty/crates/BUILD.parking_lot_core-0.9.9.bazel
index 2412001..18342dd 100644
--- a/crate_universe/3rdparty/crates/BUILD.parking_lot_core-0.9.9.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.parking_lot_core-0.9.9.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=parking_lot_core",
diff --git a/crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel b/crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel
index 8b596ff..24c6a4b 100644
--- a/crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=parse-zoneinfo",
diff --git a/crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel b/crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel
index 34638f4..ade3e0b 100644
--- a/crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=pathdiff",
diff --git a/crate_universe/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel b/crate_universe/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel
index 9050f0a..7dfe6d7 100644
--- a/crate_universe/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=percent-encoding",
diff --git a/crate_universe/3rdparty/crates/BUILD.pest-2.7.0.bazel b/crate_universe/3rdparty/crates/BUILD.pest-2.7.0.bazel
index 932b269..459d829 100644
--- a/crate_universe/3rdparty/crates/BUILD.pest-2.7.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.pest-2.7.0.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=pest",
diff --git a/crate_universe/3rdparty/crates/BUILD.pest_derive-2.7.0.bazel b/crate_universe/3rdparty/crates/BUILD.pest_derive-2.7.0.bazel
index b56bd67..92a8888 100644
--- a/crate_universe/3rdparty/crates/BUILD.pest_derive-2.7.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.pest_derive-2.7.0.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=pest_derive",
diff --git a/crate_universe/3rdparty/crates/BUILD.pest_generator-2.7.0.bazel b/crate_universe/3rdparty/crates/BUILD.pest_generator-2.7.0.bazel
index 2cd1dcf..fb25a41 100644
--- a/crate_universe/3rdparty/crates/BUILD.pest_generator-2.7.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.pest_generator-2.7.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=pest_generator",
diff --git a/crate_universe/3rdparty/crates/BUILD.pest_meta-2.7.0.bazel b/crate_universe/3rdparty/crates/BUILD.pest_meta-2.7.0.bazel
index c3bafa0..e142186 100644
--- a/crate_universe/3rdparty/crates/BUILD.pest_meta-2.7.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.pest_meta-2.7.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=pest_meta",
diff --git a/crate_universe/3rdparty/crates/BUILD.phf-0.11.2.bazel b/crate_universe/3rdparty/crates/BUILD.phf-0.11.2.bazel
index cf8dc1b..2d7fefc 100644
--- a/crate_universe/3rdparty/crates/BUILD.phf-0.11.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.phf-0.11.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=phf",
diff --git a/crate_universe/3rdparty/crates/BUILD.phf_codegen-0.11.2.bazel b/crate_universe/3rdparty/crates/BUILD.phf_codegen-0.11.2.bazel
index e88984a..2e2bb57 100644
--- a/crate_universe/3rdparty/crates/BUILD.phf_codegen-0.11.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.phf_codegen-0.11.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=phf_codegen",
diff --git a/crate_universe/3rdparty/crates/BUILD.phf_generator-0.11.2.bazel b/crate_universe/3rdparty/crates/BUILD.phf_generator-0.11.2.bazel
index 3223f32..31d606c 100644
--- a/crate_universe/3rdparty/crates/BUILD.phf_generator-0.11.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.phf_generator-0.11.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=phf_generator",
diff --git a/crate_universe/3rdparty/crates/BUILD.phf_shared-0.11.2.bazel b/crate_universe/3rdparty/crates/BUILD.phf_shared-0.11.2.bazel
index 1fa4f09..2d3df2d 100644
--- a/crate_universe/3rdparty/crates/BUILD.phf_shared-0.11.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.phf_shared-0.11.2.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=phf_shared",
diff --git a/crate_universe/3rdparty/crates/BUILD.pin-project-lite-0.2.13.bazel b/crate_universe/3rdparty/crates/BUILD.pin-project-lite-0.2.13.bazel
index c8dab80..e187eb8 100644
--- a/crate_universe/3rdparty/crates/BUILD.pin-project-lite-0.2.13.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.pin-project-lite-0.2.13.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=pin-project-lite",
diff --git a/crate_universe/3rdparty/crates/BUILD.powerfmt-0.2.0.bazel b/crate_universe/3rdparty/crates/BUILD.powerfmt-0.2.0.bazel
index cf50755..b7b3036 100644
--- a/crate_universe/3rdparty/crates/BUILD.powerfmt-0.2.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.powerfmt-0.2.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=powerfmt",
diff --git a/crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel b/crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel
index 06a91f0..f4c38fc 100644
--- a/crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=ppv-lite86",
diff --git a/crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.64.bazel b/crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.64.bazel
index 44d0939..9bfe4ca 100644
--- a/crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.64.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.64.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=proc-macro2",
diff --git a/crate_universe/3rdparty/crates/BUILD.prodash-26.2.2.bazel b/crate_universe/3rdparty/crates/BUILD.prodash-26.2.2.bazel
index c1aaa7f..5bbefb4 100644
--- a/crate_universe/3rdparty/crates/BUILD.prodash-26.2.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.prodash-26.2.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=prodash",
diff --git a/crate_universe/3rdparty/crates/BUILD.quote-1.0.29.bazel b/crate_universe/3rdparty/crates/BUILD.quote-1.0.29.bazel
index 8617f87..28c91ea 100644
--- a/crate_universe/3rdparty/crates/BUILD.quote-1.0.29.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.quote-1.0.29.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=quote",
diff --git a/crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel b/crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel
index 16559ac..bc267a0 100644
--- a/crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rand",
diff --git a/crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel b/crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel
index abf6286..3ded529 100644
--- a/crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel
@@ -40,7 +40,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rand",
diff --git a/crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel
index 25ce544..dd5cc83 100644
--- a/crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rand_chacha",
diff --git a/crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel
index 4f02bf2..b3ca6ea 100644
--- a/crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rand_core",
diff --git a/crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel b/crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel
index 7629320..6bbeb82 100644
--- a/crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rand_core",
diff --git a/crate_universe/3rdparty/crates/BUILD.rand_core-0.6.4.bazel b/crate_universe/3rdparty/crates/BUILD.rand_core-0.6.4.bazel
index 519becc..8eb5dc6 100644
--- a/crate_universe/3rdparty/crates/BUILD.rand_core-0.6.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rand_core-0.6.4.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rand_core",
diff --git a/crate_universe/3rdparty/crates/BUILD.rayon-1.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.rayon-1.8.0.bazel
index 6b70b1c..ba661c4 100644
--- a/crate_universe/3rdparty/crates/BUILD.rayon-1.8.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rayon-1.8.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rayon",
diff --git a/crate_universe/3rdparty/crates/BUILD.rayon-core-1.12.0.bazel b/crate_universe/3rdparty/crates/BUILD.rayon-core-1.12.0.bazel
index 6108c58..60d8dc9 100644
--- a/crate_universe/3rdparty/crates/BUILD.rayon-core-1.12.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rayon-core-1.12.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rayon-core",
diff --git a/crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel
index 542af34..b2d2670 100644
--- a/crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rdrand",
diff --git a/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel b/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel
index 8682e90..70d5b67 100644
--- a/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=redox_syscall",
diff --git a/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.4.1.bazel b/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.4.1.bazel
index fa51f85..3253006 100644
--- a/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.4.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.4.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=redox_syscall",
diff --git a/crate_universe/3rdparty/crates/BUILD.regex-1.10.2.bazel b/crate_universe/3rdparty/crates/BUILD.regex-1.10.2.bazel
index c1b3d78..4f2b8cf 100644
--- a/crate_universe/3rdparty/crates/BUILD.regex-1.10.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.regex-1.10.2.bazel
@@ -49,7 +49,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=regex",
diff --git a/crate_universe/3rdparty/crates/BUILD.regex-automata-0.3.3.bazel b/crate_universe/3rdparty/crates/BUILD.regex-automata-0.3.3.bazel
index fb56f21..f499849 100644
--- a/crate_universe/3rdparty/crates/BUILD.regex-automata-0.3.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.regex-automata-0.3.3.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=regex-automata",
diff --git a/crate_universe/3rdparty/crates/BUILD.regex-automata-0.4.3.bazel b/crate_universe/3rdparty/crates/BUILD.regex-automata-0.4.3.bazel
index 5fedf30..dd036d8 100644
--- a/crate_universe/3rdparty/crates/BUILD.regex-automata-0.4.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.regex-automata-0.4.3.bazel
@@ -54,7 +54,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=regex-automata",
diff --git a/crate_universe/3rdparty/crates/BUILD.regex-syntax-0.8.2.bazel b/crate_universe/3rdparty/crates/BUILD.regex-syntax-0.8.2.bazel
index 6ba9b51..585d667 100644
--- a/crate_universe/3rdparty/crates/BUILD.regex-syntax-0.8.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.regex-syntax-0.8.2.bazel
@@ -42,7 +42,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=regex-syntax",
diff --git a/crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel
index 0806607..da5c234 100644
--- a/crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rustc-hash",
diff --git a/crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel b/crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel
index d53fb8b..8d95b09 100644
--- a/crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rustc-serialize",
diff --git a/crate_universe/3rdparty/crates/BUILD.rustix-0.37.23.bazel b/crate_universe/3rdparty/crates/BUILD.rustix-0.37.23.bazel
index 5e8e07f..e156608 100644
--- a/crate_universe/3rdparty/crates/BUILD.rustix-0.37.23.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rustix-0.37.23.bazel
@@ -123,7 +123,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rustix",
diff --git a/crate_universe/3rdparty/crates/BUILD.rustix-0.38.21.bazel b/crate_universe/3rdparty/crates/BUILD.rustix-0.38.21.bazel
index 62bc210..5e46198 100644
--- a/crate_universe/3rdparty/crates/BUILD.rustix-0.38.21.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.rustix-0.38.21.bazel
@@ -121,82 +121,84 @@
"use-libc-auxv",
] + select({
"@rules_rust//rust/platform:aarch64-apple-darwin": [
- "termios",
+ "termios", # aarch64-apple-darwin
],
"@rules_rust//rust/platform:aarch64-apple-ios": [
- "termios",
+ "termios", # aarch64-apple-ios
],
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [
- "termios",
+ "termios", # aarch64-apple-ios-sim
],
"@rules_rust//rust/platform:aarch64-fuchsia": [
- "termios",
+ "termios", # aarch64-fuchsia
],
"@rules_rust//rust/platform:aarch64-linux-android": [
- "termios",
+ "termios", # aarch64-linux-android
],
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [
- "termios",
+ "termios", # aarch64-unknown-linux-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [
- "termios",
+ "termios", # aarch64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [
- "termios",
+ "termios", # aarch64-unknown-nto-qnx710
],
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [
- "termios",
+ "termios", # arm-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:armv7-linux-androideabi": [
- "termios",
+ "termios", # armv7-linux-androideabi
],
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [
- "termios",
+ "termios", # armv7-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:i686-apple-darwin": [
- "termios",
+ "termios", # i686-apple-darwin
],
"@rules_rust//rust/platform:i686-linux-android": [
- "termios",
+ "termios", # i686-linux-android
],
"@rules_rust//rust/platform:i686-unknown-freebsd": [
- "termios",
+ "termios", # i686-unknown-freebsd
],
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [
- "termios",
+ "termios", # i686-unknown-linux-gnu
],
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [
- "termios",
+ "termios", # powerpc-unknown-linux-gnu
],
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [
- "termios",
+ "termios", # s390x-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-apple-darwin": [
- "termios",
+ "termios", # x86_64-apple-darwin
],
"@rules_rust//rust/platform:x86_64-apple-ios": [
- "termios",
+ "termios", # x86_64-apple-ios
],
"@rules_rust//rust/platform:x86_64-fuchsia": [
- "termios",
+ "termios", # x86_64-fuchsia
],
"@rules_rust//rust/platform:x86_64-linux-android": [
- "termios",
+ "termios", # x86_64-linux-android
],
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [
- "termios",
+ "termios", # x86_64-unknown-freebsd
],
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [
- "termios",
+ "termios", # x86_64-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [
- "termios",
+ "termios", # x86_64-unknown-nixos-gnu
],
"//conditions:default": [],
}),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=rustix",
@@ -396,76 +398,76 @@
"use-libc-auxv",
] + select({
"@rules_rust//rust/platform:aarch64-apple-darwin": [
- "termios",
+ "termios", # aarch64-apple-darwin
],
"@rules_rust//rust/platform:aarch64-apple-ios": [
- "termios",
+ "termios", # aarch64-apple-ios
],
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [
- "termios",
+ "termios", # aarch64-apple-ios-sim
],
"@rules_rust//rust/platform:aarch64-fuchsia": [
- "termios",
+ "termios", # aarch64-fuchsia
],
"@rules_rust//rust/platform:aarch64-linux-android": [
- "termios",
+ "termios", # aarch64-linux-android
],
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [
- "termios",
+ "termios", # aarch64-unknown-linux-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [
- "termios",
+ "termios", # aarch64-unknown-nixos-gnu
],
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [
- "termios",
+ "termios", # aarch64-unknown-nto-qnx710
],
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [
- "termios",
+ "termios", # arm-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:armv7-linux-androideabi": [
- "termios",
+ "termios", # armv7-linux-androideabi
],
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [
- "termios",
+ "termios", # armv7-unknown-linux-gnueabi
],
"@rules_rust//rust/platform:i686-apple-darwin": [
- "termios",
+ "termios", # i686-apple-darwin
],
"@rules_rust//rust/platform:i686-linux-android": [
- "termios",
+ "termios", # i686-linux-android
],
"@rules_rust//rust/platform:i686-unknown-freebsd": [
- "termios",
+ "termios", # i686-unknown-freebsd
],
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [
- "termios",
+ "termios", # i686-unknown-linux-gnu
],
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [
- "termios",
+ "termios", # powerpc-unknown-linux-gnu
],
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [
- "termios",
+ "termios", # s390x-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-apple-darwin": [
- "termios",
+ "termios", # x86_64-apple-darwin
],
"@rules_rust//rust/platform:x86_64-apple-ios": [
- "termios",
+ "termios", # x86_64-apple-ios
],
"@rules_rust//rust/platform:x86_64-fuchsia": [
- "termios",
+ "termios", # x86_64-fuchsia
],
"@rules_rust//rust/platform:x86_64-linux-android": [
- "termios",
+ "termios", # x86_64-linux-android
],
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [
- "termios",
+ "termios", # x86_64-unknown-freebsd
],
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [
- "termios",
+ "termios", # x86_64-unknown-linux-gnu
],
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [
- "termios",
+ "termios", # x86_64-unknown-nixos-gnu
],
"//conditions:default": [],
}),
diff --git a/crate_universe/3rdparty/crates/BUILD.ryu-1.0.14.bazel b/crate_universe/3rdparty/crates/BUILD.ryu-1.0.14.bazel
index e526145..b0846ef 100644
--- a/crate_universe/3rdparty/crates/BUILD.ryu-1.0.14.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.ryu-1.0.14.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=ryu",
diff --git a/crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel b/crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel
index b45d4f6..baa4b93 100644
--- a/crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=same-file",
diff --git a/crate_universe/3rdparty/crates/BUILD.scopeguard-1.2.0.bazel b/crate_universe/3rdparty/crates/BUILD.scopeguard-1.2.0.bazel
index e6c35ec..cc84bea 100644
--- a/crate_universe/3rdparty/crates/BUILD.scopeguard-1.2.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.scopeguard-1.2.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=scopeguard",
diff --git a/crate_universe/3rdparty/crates/BUILD.semver-1.0.20.bazel b/crate_universe/3rdparty/crates/BUILD.semver-1.0.20.bazel
index cbe1d5b..2d12ee4 100644
--- a/crate_universe/3rdparty/crates/BUILD.semver-1.0.20.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.semver-1.0.20.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=semver",
diff --git a/crate_universe/3rdparty/crates/BUILD.serde-1.0.190.bazel b/crate_universe/3rdparty/crates/BUILD.serde-1.0.190.bazel
index cde51c3..af235dc 100644
--- a/crate_universe/3rdparty/crates/BUILD.serde-1.0.190.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.serde-1.0.190.bazel
@@ -41,7 +41,9 @@
proc_macro_deps = [
"@cui__serde_derive-1.0.190//:serde_derive",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=serde",
diff --git a/crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.190.bazel b/crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.190.bazel
index 958a491..2efac9c 100644
--- a/crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.190.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.190.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=serde_derive",
diff --git a/crate_universe/3rdparty/crates/BUILD.serde_json-1.0.108.bazel b/crate_universe/3rdparty/crates/BUILD.serde_json-1.0.108.bazel
index b217643..d262aec 100644
--- a/crate_universe/3rdparty/crates/BUILD.serde_json-1.0.108.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.serde_json-1.0.108.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=serde_json",
diff --git a/crate_universe/3rdparty/crates/BUILD.serde_spanned-0.6.4.bazel b/crate_universe/3rdparty/crates/BUILD.serde_spanned-0.6.4.bazel
index 227efda..19e03bd 100644
--- a/crate_universe/3rdparty/crates/BUILD.serde_spanned-0.6.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.serde_spanned-0.6.4.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=serde_spanned",
diff --git a/crate_universe/3rdparty/crates/BUILD.serde_starlark-0.1.14.bazel b/crate_universe/3rdparty/crates/BUILD.serde_starlark-0.1.14.bazel
index a6e44f8..90bf0c1 100644
--- a/crate_universe/3rdparty/crates/BUILD.serde_starlark-0.1.14.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.serde_starlark-0.1.14.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=serde_starlark",
diff --git a/crate_universe/3rdparty/crates/BUILD.sha1_smol-1.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.sha1_smol-1.0.0.bazel
index 6933ab7..d692192 100644
--- a/crate_universe/3rdparty/crates/BUILD.sha1_smol-1.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.sha1_smol-1.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=sha1_smol",
diff --git a/crate_universe/3rdparty/crates/BUILD.sha2-0.10.8.bazel b/crate_universe/3rdparty/crates/BUILD.sha2-0.10.8.bazel
index 0545513..347182c 100644
--- a/crate_universe/3rdparty/crates/BUILD.sha2-0.10.8.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.sha2-0.10.8.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=sha2",
diff --git a/crate_universe/3rdparty/crates/BUILD.sharded-slab-0.1.7.bazel b/crate_universe/3rdparty/crates/BUILD.sharded-slab-0.1.7.bazel
index 233b505..8ca2bc5 100644
--- a/crate_universe/3rdparty/crates/BUILD.sharded-slab-0.1.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.sharded-slab-0.1.7.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=sharded-slab",
diff --git a/crate_universe/3rdparty/crates/BUILD.siphasher-0.3.10.bazel b/crate_universe/3rdparty/crates/BUILD.siphasher-0.3.10.bazel
index 132b4dc..428e4c7 100644
--- a/crate_universe/3rdparty/crates/BUILD.siphasher-0.3.10.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.siphasher-0.3.10.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=siphasher",
diff --git a/crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel
index 0fbd39a..70ae0de 100644
--- a/crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=slug",
diff --git a/crate_universe/3rdparty/crates/BUILD.smallvec-1.11.0.bazel b/crate_universe/3rdparty/crates/BUILD.smallvec-1.11.0.bazel
index 6281945..6c3d4a1 100644
--- a/crate_universe/3rdparty/crates/BUILD.smallvec-1.11.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.smallvec-1.11.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=smallvec",
diff --git a/crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel
index 81ed669..9489b2a 100644
--- a/crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=smawk",
diff --git a/crate_universe/3rdparty/crates/BUILD.smol_str-0.2.0.bazel b/crate_universe/3rdparty/crates/BUILD.smol_str-0.2.0.bazel
index 17b298b..1c47039 100644
--- a/crate_universe/3rdparty/crates/BUILD.smol_str-0.2.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.smol_str-0.2.0.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=smol_str",
diff --git a/crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel b/crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel
index 0e90cc6..0b00f41 100644
--- a/crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=spectral",
diff --git a/crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel b/crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel
index ff50216..6d9e28d 100644
--- a/crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=strsim",
diff --git a/crate_universe/3rdparty/crates/BUILD.syn-1.0.109.bazel b/crate_universe/3rdparty/crates/BUILD.syn-1.0.109.bazel
index 243ddca..9080820 100644
--- a/crate_universe/3rdparty/crates/BUILD.syn-1.0.109.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.syn-1.0.109.bazel
@@ -42,7 +42,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=syn",
diff --git a/crate_universe/3rdparty/crates/BUILD.syn-2.0.32.bazel b/crate_universe/3rdparty/crates/BUILD.syn-2.0.32.bazel
index 7b8d40b..6c44bdd 100644
--- a/crate_universe/3rdparty/crates/BUILD.syn-2.0.32.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.syn-2.0.32.bazel
@@ -43,7 +43,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=syn",
diff --git a/crate_universe/3rdparty/crates/BUILD.tempfile-3.8.1.bazel b/crate_universe/3rdparty/crates/BUILD.tempfile-3.8.1.bazel
index a739d51..c7ed931 100644
--- a/crate_universe/3rdparty/crates/BUILD.tempfile-3.8.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tempfile-3.8.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tempfile",
diff --git a/crate_universe/3rdparty/crates/BUILD.tera-1.19.1.bazel b/crate_universe/3rdparty/crates/BUILD.tera-1.19.1.bazel
index ab1ff39..3286a2b 100644
--- a/crate_universe/3rdparty/crates/BUILD.tera-1.19.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tera-1.19.1.bazel
@@ -44,7 +44,9 @@
proc_macro_deps = [
"@cui__pest_derive-2.7.0//:pest_derive",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tera",
diff --git a/crate_universe/3rdparty/crates/BUILD.textwrap-0.16.0.bazel b/crate_universe/3rdparty/crates/BUILD.textwrap-0.16.0.bazel
index e80b3b3..ec1b7bd 100644
--- a/crate_universe/3rdparty/crates/BUILD.textwrap-0.16.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.textwrap-0.16.0.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=textwrap",
diff --git a/crate_universe/3rdparty/crates/BUILD.thiserror-1.0.50.bazel b/crate_universe/3rdparty/crates/BUILD.thiserror-1.0.50.bazel
index 2c37700..b4f6718 100644
--- a/crate_universe/3rdparty/crates/BUILD.thiserror-1.0.50.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.thiserror-1.0.50.bazel
@@ -34,7 +34,9 @@
proc_macro_deps = [
"@cui__thiserror-impl-1.0.50//:thiserror_impl",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=thiserror",
diff --git a/crate_universe/3rdparty/crates/BUILD.thiserror-impl-1.0.50.bazel b/crate_universe/3rdparty/crates/BUILD.thiserror-impl-1.0.50.bazel
index 0b96021..1173f20 100644
--- a/crate_universe/3rdparty/crates/BUILD.thiserror-impl-1.0.50.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.thiserror-impl-1.0.50.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=thiserror-impl",
diff --git a/crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel
index eef2d2c..f83c23e 100644
--- a/crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=thread_local",
diff --git a/crate_universe/3rdparty/crates/BUILD.time-0.3.30.bazel b/crate_universe/3rdparty/crates/BUILD.time-0.3.30.bazel
index 360a13d..704f5e2 100644
--- a/crate_universe/3rdparty/crates/BUILD.time-0.3.30.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.time-0.3.30.bazel
@@ -41,7 +41,9 @@
proc_macro_deps = [
"@cui__time-macros-0.2.15//:time_macros",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=time",
diff --git a/crate_universe/3rdparty/crates/BUILD.time-core-0.1.2.bazel b/crate_universe/3rdparty/crates/BUILD.time-core-0.1.2.bazel
index 783d5e7..6850aa1 100644
--- a/crate_universe/3rdparty/crates/BUILD.time-core-0.1.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.time-core-0.1.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=time-core",
diff --git a/crate_universe/3rdparty/crates/BUILD.time-macros-0.2.15.bazel b/crate_universe/3rdparty/crates/BUILD.time-macros-0.2.15.bazel
index 3d10210..32b22ee 100644
--- a/crate_universe/3rdparty/crates/BUILD.time-macros-0.2.15.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.time-macros-0.2.15.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=time-macros",
diff --git a/crate_universe/3rdparty/crates/BUILD.tinyvec-1.6.0.bazel b/crate_universe/3rdparty/crates/BUILD.tinyvec-1.6.0.bazel
index e375e45..e3e7081 100644
--- a/crate_universe/3rdparty/crates/BUILD.tinyvec-1.6.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tinyvec-1.6.0.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tinyvec",
diff --git a/crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.1.bazel b/crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.1.bazel
index 7cb992f..d0abd65 100644
--- a/crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tinyvec_macros",
diff --git a/crate_universe/3rdparty/crates/BUILD.toml-0.7.6.bazel b/crate_universe/3rdparty/crates/BUILD.toml-0.7.6.bazel
index 35b388f..9c32e2b 100644
--- a/crate_universe/3rdparty/crates/BUILD.toml-0.7.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.toml-0.7.6.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=toml",
diff --git a/crate_universe/3rdparty/crates/BUILD.toml-0.8.6.bazel b/crate_universe/3rdparty/crates/BUILD.toml-0.8.6.bazel
index 460e08c..5feff24 100644
--- a/crate_universe/3rdparty/crates/BUILD.toml-0.8.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.toml-0.8.6.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=toml",
diff --git a/crate_universe/3rdparty/crates/BUILD.toml_datetime-0.6.5.bazel b/crate_universe/3rdparty/crates/BUILD.toml_datetime-0.6.5.bazel
index 855cd1a..6b81b1d 100644
--- a/crate_universe/3rdparty/crates/BUILD.toml_datetime-0.6.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.toml_datetime-0.6.5.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=toml_datetime",
diff --git a/crate_universe/3rdparty/crates/BUILD.toml_edit-0.19.13.bazel b/crate_universe/3rdparty/crates/BUILD.toml_edit-0.19.13.bazel
index d2fb234..6c49361 100644
--- a/crate_universe/3rdparty/crates/BUILD.toml_edit-0.19.13.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.toml_edit-0.19.13.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=toml_edit",
@@ -81,7 +83,7 @@
}),
version = "0.19.13",
deps = [
- "@cui__indexmap-2.0.0//:indexmap",
+ "@cui__indexmap-2.1.0//:indexmap",
"@cui__serde-1.0.190//:serde",
"@cui__serde_spanned-0.6.4//:serde_spanned",
"@cui__toml_datetime-0.6.5//:toml_datetime",
diff --git a/crate_universe/3rdparty/crates/BUILD.toml_edit-0.20.7.bazel b/crate_universe/3rdparty/crates/BUILD.toml_edit-0.20.7.bazel
index d5a16d4..e58278d 100644
--- a/crate_universe/3rdparty/crates/BUILD.toml_edit-0.20.7.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.toml_edit-0.20.7.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=toml_edit",
@@ -81,7 +83,7 @@
}),
version = "0.20.7",
deps = [
- "@cui__indexmap-2.0.0//:indexmap",
+ "@cui__indexmap-2.1.0//:indexmap",
"@cui__serde-1.0.190//:serde",
"@cui__serde_spanned-0.6.4//:serde_spanned",
"@cui__toml_datetime-0.6.5//:toml_datetime",
diff --git a/crate_universe/3rdparty/crates/BUILD.tracing-0.1.40.bazel b/crate_universe/3rdparty/crates/BUILD.tracing-0.1.40.bazel
index a4d34dc..bb2cd83 100644
--- a/crate_universe/3rdparty/crates/BUILD.tracing-0.1.40.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tracing-0.1.40.bazel
@@ -39,7 +39,9 @@
proc_macro_deps = [
"@cui__tracing-attributes-0.1.27//:tracing_attributes",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tracing",
diff --git a/crate_universe/3rdparty/crates/BUILD.tracing-attributes-0.1.27.bazel b/crate_universe/3rdparty/crates/BUILD.tracing-attributes-0.1.27.bazel
index c47d658..8834d1b 100644
--- a/crate_universe/3rdparty/crates/BUILD.tracing-attributes-0.1.27.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tracing-attributes-0.1.27.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tracing-attributes",
diff --git a/crate_universe/3rdparty/crates/BUILD.tracing-core-0.1.32.bazel b/crate_universe/3rdparty/crates/BUILD.tracing-core-0.1.32.bazel
index ad0083c..b3007f6 100644
--- a/crate_universe/3rdparty/crates/BUILD.tracing-core-0.1.32.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tracing-core-0.1.32.bazel
@@ -35,7 +35,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tracing-core",
diff --git a/crate_universe/3rdparty/crates/BUILD.tracing-log-0.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.tracing-log-0.1.4.bazel
index bf452fb..583b4e0 100644
--- a/crate_universe/3rdparty/crates/BUILD.tracing-log-0.1.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tracing-log-0.1.4.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tracing-log",
diff --git a/crate_universe/3rdparty/crates/BUILD.tracing-subscriber-0.3.17.bazel b/crate_universe/3rdparty/crates/BUILD.tracing-subscriber-0.3.17.bazel
index b3c5263..19d0dd8 100644
--- a/crate_universe/3rdparty/crates/BUILD.tracing-subscriber-0.3.17.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.tracing-subscriber-0.3.17.bazel
@@ -43,7 +43,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=tracing-subscriber",
diff --git a/crate_universe/3rdparty/crates/BUILD.typenum-1.16.0.bazel b/crate_universe/3rdparty/crates/BUILD.typenum-1.16.0.bazel
index dc756d9..656d395 100644
--- a/crate_universe/3rdparty/crates/BUILD.typenum-1.16.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.typenum-1.16.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=typenum",
diff --git a/crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.6.bazel b/crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.6.bazel
index a1fed2c..e8a7591 100644
--- a/crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.6.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.6.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=ucd-trie",
diff --git a/crate_universe/3rdparty/crates/BUILD.uluru-3.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.uluru-3.0.0.bazel
index 5caa237..42b4acd 100644
--- a/crate_universe/3rdparty/crates/BUILD.uluru-3.0.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.uluru-3.0.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=uluru",
diff --git a/crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel
index 70183a2..c45566c 100644
--- a/crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unic-char-property",
diff --git a/crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel
index 3aa7e97..cf8348c 100644
--- a/crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unic-char-range",
diff --git a/crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel
index 9abb9a7..14008ff 100644
--- a/crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unic-common",
diff --git a/crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel
index c6922eb..1e6a551 100644
--- a/crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unic-segment",
diff --git a/crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel
index 97cfd3a..b4e895d 100644
--- a/crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unic-ucd-segment",
diff --git a/crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel
index f953264..a94f80b 100644
--- a/crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unic-ucd-version",
diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.13.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.13.bazel
index 7c0b6e7..73c771f 100644
--- a/crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.13.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.13.bazel
@@ -34,7 +34,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unicode-bidi",
diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-bom-2.0.2.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-bom-2.0.2.bazel
index 2676538..9dec232 100644
--- a/crate_universe/3rdparty/crates/BUILD.unicode-bom-2.0.2.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unicode-bom-2.0.2.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unicode-bom",
diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-ident-1.0.10.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-ident-1.0.10.bazel
index cdd574c..3767c39 100644
--- a/crate_universe/3rdparty/crates/BUILD.unicode-ident-1.0.10.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unicode-ident-1.0.10.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unicode-ident",
diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.4.bazel
index 5e53614..b5ade7b 100644
--- a/crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.4.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unicode-linebreak",
diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.22.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.22.bazel
index 2331355..fcf179d 100644
--- a/crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.22.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.22.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unicode-normalization",
diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.10.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.10.bazel
index 34042bb..dccbe5f 100644
--- a/crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.10.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.10.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=unicode-width",
diff --git a/crate_universe/3rdparty/crates/BUILD.url-2.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.url-2.4.0.bazel
index b4c19fe..cd7c9d4 100644
--- a/crate_universe/3rdparty/crates/BUILD.url-2.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.url-2.4.0.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=url",
diff --git a/crate_universe/3rdparty/crates/BUILD.utf8parse-0.2.1.bazel b/crate_universe/3rdparty/crates/BUILD.utf8parse-0.2.1.bazel
index 0dc9c48..09a8bd8 100644
--- a/crate_universe/3rdparty/crates/BUILD.utf8parse-0.2.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.utf8parse-0.2.1.bazel
@@ -33,7 +33,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=utf8parse",
diff --git a/crate_universe/3rdparty/crates/BUILD.valuable-0.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.valuable-0.1.0.bazel
index 7e65a09..66d3a55 100644
--- a/crate_universe/3rdparty/crates/BUILD.valuable-0.1.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.valuable-0.1.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=valuable",
diff --git a/crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel b/crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel
index 5a11bf3..11c8443 100644
--- a/crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=version_check",
diff --git a/crate_universe/3rdparty/crates/BUILD.walkdir-2.3.3.bazel b/crate_universe/3rdparty/crates/BUILD.walkdir-2.3.3.bazel
index c89c546..edc5768 100644
--- a/crate_universe/3rdparty/crates/BUILD.walkdir-2.3.3.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.walkdir-2.3.3.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=walkdir",
diff --git a/crate_universe/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel b/crate_universe/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel
index d286783..41f388f 100644
--- a/crate_universe/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=wasi",
diff --git a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-0.2.87.bazel b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-0.2.87.bazel
index 73b84aa..50598f6 100644
--- a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-0.2.87.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-0.2.87.bazel
@@ -34,7 +34,9 @@
proc_macro_deps = [
"@cui__wasm-bindgen-macro-0.2.87//:wasm_bindgen_macro",
],
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=wasm-bindgen",
diff --git a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-backend-0.2.87.bazel b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-backend-0.2.87.bazel
index 36809de..cf2673b 100644
--- a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-backend-0.2.87.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-backend-0.2.87.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=wasm-bindgen-backend",
diff --git a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-0.2.87.bazel b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-0.2.87.bazel
index c841b6b..23b6962 100644
--- a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-0.2.87.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-0.2.87.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=wasm-bindgen-macro",
diff --git a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-support-0.2.87.bazel b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-support-0.2.87.bazel
index 78c5e8e..5790273 100644
--- a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-support-0.2.87.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-macro-support-0.2.87.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=wasm-bindgen-macro-support",
diff --git a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-shared-0.2.87.bazel b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-shared-0.2.87.bazel
index bd11279..fc098af 100644
--- a/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-shared-0.2.87.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.wasm-bindgen-shared-0.2.87.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=wasm-bindgen-shared",
diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel
index 1f6c527..9103020 100644
--- a/crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel
@@ -49,7 +49,9 @@
],
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=winapi",
diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel
index b3810f3..7eb46bb 100644
--- a/crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=winapi-i686-pc-windows-gnu",
diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel
index 0eb5f25..d80c96e 100644
--- a/crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=winapi-util",
diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel
index 6f8ad30..030dd62 100644
--- a/crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2015",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=winapi-x86_64-pc-windows-gnu",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows-0.48.0.bazel
index bf4d1ff..0d48dd9 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows-0.48.0.bazel
@@ -42,7 +42,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel
index 9cd1f5c..32c1699 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel
@@ -46,7 +46,9 @@
],
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows-sys",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows-targets-0.48.1.bazel b/crate_universe/3rdparty/crates/BUILD.windows-targets-0.48.1.bazel
index 3ecad60..35dbc96 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows-targets-0.48.1.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows-targets-0.48.1.bazel
@@ -30,7 +30,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows-targets",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel
index 0584343..1ebb8a1 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows_aarch64_gnullvm",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel
index 659417e..6e6696f 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows_aarch64_msvc",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel
index 30cef73..5d7ac3e 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows_i686_gnu",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel
index 7cdd17f..2208c40 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows_i686_msvc",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel
index f8c21d6..fcc9b39 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows_x86_64_gnu",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel
index c6b66d1..222c27d 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows_x86_64_gnullvm",
diff --git a/crate_universe/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel b/crate_universe/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel
index 4fa6154..8f1e26d 100644
--- a/crate_universe/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel
@@ -31,7 +31,9 @@
),
crate_root = "src/lib.rs",
edition = "2018",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=windows_x86_64_msvc",
diff --git a/crate_universe/3rdparty/crates/BUILD.winnow-0.5.18.bazel b/crate_universe/3rdparty/crates/BUILD.winnow-0.5.18.bazel
index d5cff4a..7aec567 100644
--- a/crate_universe/3rdparty/crates/BUILD.winnow-0.5.18.bazel
+++ b/crate_universe/3rdparty/crates/BUILD.winnow-0.5.18.bazel
@@ -36,7 +36,9 @@
],
crate_root = "src/lib.rs",
edition = "2021",
- rustc_flags = ["--cap-lints=allow"],
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
tags = [
"cargo-bazel",
"crate-name=winnow",
diff --git a/crate_universe/3rdparty/crates/defs.bzl b/crate_universe/3rdparty/crates/defs.bzl
index 4f08e52..33dcce2 100644
--- a/crate_universe/3rdparty/crates/defs.bzl
+++ b/crate_universe/3rdparty/crates/defs.bzl
@@ -460,7 +460,8 @@
"aarch64-linux-android": ["@rules_rust//rust/platform:aarch64-linux-android"],
"aarch64-pc-windows-gnullvm": [],
"aarch64-pc-windows-msvc": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"],
- "aarch64-unknown-linux-gnu": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu"],
+ "aarch64-unknown-linux-gnu": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu"],
+ "aarch64-unknown-nixos-gnu": ["@rules_rust//rust/platform:aarch64-unknown-nixos-gnu"],
"aarch64-unknown-nto-qnx710": ["@rules_rust//rust/platform:aarch64-unknown-nto-qnx710"],
"arm-unknown-linux-gnueabi": ["@rules_rust//rust/platform:arm-unknown-linux-gnueabi"],
"armv7-linux-androideabi": ["@rules_rust//rust/platform:armv7-linux-androideabi"],
@@ -525,7 +526,8 @@
"x86_64-pc-windows-gnullvm": [],
"x86_64-pc-windows-msvc": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"],
"x86_64-unknown-freebsd": ["@rules_rust//rust/platform:x86_64-unknown-freebsd"],
- "x86_64-unknown-linux-gnu": ["@rules_rust//rust/platform:x86_64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu"],
+ "x86_64-unknown-linux-gnu": ["@rules_rust//rust/platform:x86_64-unknown-linux-gnu"],
+ "x86_64-unknown-nixos-gnu": ["@rules_rust//rust/platform:x86_64-unknown-nixos-gnu"],
"x86_64-unknown-none": ["@rules_rust//rust/platform:x86_64-unknown-none"],
}
@@ -1719,12 +1721,12 @@
maybe(
http_archive,
- name = "cui__hashbrown-0.14.0",
- sha256 = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a",
+ name = "cui__hashbrown-0.14.3",
+ sha256 = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604",
type = "tar.gz",
- urls = ["https://crates.io/api/v1/crates/hashbrown/0.14.0/download"],
- strip_prefix = "hashbrown-0.14.0",
- build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.hashbrown-0.14.0.bazel"),
+ urls = ["https://crates.io/api/v1/crates/hashbrown/0.14.3/download"],
+ strip_prefix = "hashbrown-0.14.3",
+ build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.hashbrown-0.14.3.bazel"),
)
maybe(
@@ -1819,12 +1821,12 @@
maybe(
http_archive,
- name = "cui__indexmap-2.0.0",
- sha256 = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d",
+ name = "cui__indexmap-2.1.0",
+ sha256 = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f",
type = "tar.gz",
- urls = ["https://crates.io/api/v1/crates/indexmap/2.0.0/download"],
- strip_prefix = "indexmap-2.0.0",
- build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.indexmap-2.0.0.bazel"),
+ urls = ["https://crates.io/api/v1/crates/indexmap/2.1.0/download"],
+ strip_prefix = "indexmap-2.1.0",
+ build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.indexmap-2.1.0.bazel"),
)
maybe(
diff --git a/crate_universe/Cargo.lock b/crate_universe/Cargo.lock
index 8b429dce..3cca473 100644
--- a/crate_universe/Cargo.lock
+++ b/crate_universe/Cargo.lock
@@ -935,7 +935,7 @@
checksum = "409268480841ad008e81c17ca5a293393fbf9f2b6c2f85b8ab9de1f0c5176a16"
dependencies = [
"gix-hash",
- "hashbrown 0.14.0",
+ "hashbrown 0.14.3",
"parking_lot",
]
@@ -1393,9 +1393,9 @@
[[package]]
name = "hashbrown"
-version = "0.14.0"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
+checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
[[package]]
name = "heck"
@@ -1489,12 +1489,12 @@
[[package]]
name = "indexmap"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
+checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
dependencies = [
"equivalent",
- "hashbrown 0.14.0",
+ "hashbrown 0.14.3",
]
[[package]]
diff --git a/crate_universe/private/bootstrap_utils.bzl b/crate_universe/private/bootstrap_utils.bzl
index d836331..61cab43 100644
--- a/crate_universe/private/bootstrap_utils.bzl
+++ b/crate_universe/private/bootstrap_utils.bzl
@@ -44,7 +44,7 @@
)
_INSTALLER_TEMPLATE = """\
-#!/bin/bash
+#!/usr/bin/env bash
set -euo pipefail
cp -f "{path}" "${{BUILD_WORKSPACE_DIRECTORY}}/{dest}"
"""
diff --git a/crate_universe/private/crate.bzl b/crate_universe/private/crate.bzl
index 1901d54..0ba03db 100644
--- a/crate_universe/private/crate.bzl
+++ b/crate_universe/private/crate.bzl
@@ -139,7 +139,7 @@
compile_data (list, optional): A list of labels to add to a crate's `rust_library::compile_data` attribute.
compile_data_glob (list, optional): A list of glob patterns to add to a crate's `rust_library::compile_data`
attribute.
- crate_features (list, optional): A list of strings to add to a crate's `rust_library::crate_features`
+ crate_features (optional): A list of strings to add to a crate's `rust_library::crate_features`
attribute.
data (list, optional): A list of labels to add to a crate's `rust_library::data` attribute.
data_glob (list, optional): A list of glob patterns to add to a crate's `rust_library::data` attribute.
@@ -211,8 +211,24 @@
),
))
+def _select(common, selects):
+ """A Starlark Select for `crate.annotation()`.
+
+ Args:
+ common: A value that applies to all configurations.
+ selects (dict): A dict of `target_triple` to values.
+
+ Returns:
+ struct: A struct representing the Starlark Select.
+ """
+ return struct(
+ common = common,
+ selects = selects,
+ )
+
crate = struct(
spec = _spec,
annotation = _annotation,
workspace_member = _workspace_member,
+ select = _select,
)
diff --git a/crate_universe/private/srcs.bzl b/crate_universe/private/srcs.bzl
index 5864ada..3f7b348 100644
--- a/crate_universe/private/srcs.bzl
+++ b/crate_universe/private/srcs.bzl
@@ -27,6 +27,7 @@
Label("//crate_universe:src/rendering/templates/partials/module/repo_git.j2"),
Label("//crate_universe:src/rendering/templates/partials/module/repo_http.j2"),
Label("//crate_universe:src/rendering/templates/vendor_module.j2"),
+ Label("//crate_universe:src/select.rs"),
Label("//crate_universe:src/splicing.rs"),
Label("//crate_universe:src/splicing/cargo_config.rs"),
Label("//crate_universe:src/splicing/crate_index_lookup.rs"),
@@ -37,6 +38,10 @@
Label("//crate_universe:src/utils/starlark/glob.rs"),
Label("//crate_universe:src/utils/starlark/label.rs"),
Label("//crate_universe:src/utils/starlark/select.rs"),
+ Label("//crate_universe:src/utils/starlark/select_dict.rs"),
+ Label("//crate_universe:src/utils/starlark/select_list.rs"),
+ Label("//crate_universe:src/utils/starlark/select_scalar.rs"),
+ Label("//crate_universe:src/utils/starlark/select_set.rs"),
Label("//crate_universe:src/utils/starlark/serialize.rs"),
Label("//crate_universe:src/utils/starlark/target_compatible_with.rs"),
Label("//crate_universe:src/utils/target_triple.rs"),
diff --git a/crate_universe/src/config.rs b/crate_universe/src/config.rs
index 3f88cc0..280bc82 100644
--- a/crate_universe/src/config.rs
+++ b/crate_universe/src/config.rs
@@ -15,6 +15,7 @@
use serde::de::{Deserializer, SeqAccess, Visitor};
use serde::{Deserialize, Serialize, Serializer};
+use crate::select::{Select, Selectable};
use crate::utils::target_triple::TargetTriple;
/// Representations of different kinds of crate vendoring into workspaces.
@@ -159,14 +160,6 @@
}
}
}
-/// A value which may either be a plain String, or a dict of platform triples
-/// (or other cfg expressions understood by `crate::context::platforms::resolve_cfg_platforms`) to Strings.
-#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
-#[serde(untagged)]
-pub enum StringOrSelect {
- Value(String),
- Select(BTreeMap<String, String>),
-}
/// Information representing deterministic identifiers for some remote asset.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
@@ -223,7 +216,7 @@
}
}
-#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq)]
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CrateAnnotations {
/// Which subset of the crate's bins should get produced as `rust_binary` targets.
pub gen_binaries: Option<GenBinaries>,
@@ -233,19 +226,19 @@
/// Additional data to pass to
/// [deps](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-deps) attribute.
- pub deps: Option<BTreeSet<StringOrSelect>>,
+ pub deps: Option<Select<BTreeSet<String>>>,
/// Additional data to pass to
/// [proc_macro_deps](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-proc_macro_deps) attribute.
- pub proc_macro_deps: Option<BTreeSet<StringOrSelect>>,
+ pub proc_macro_deps: Option<Select<BTreeSet<String>>>,
/// Additional data to pass to the target's
/// [crate_features](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-crate_features) attribute.
- pub crate_features: Option<BTreeSet<String>>,
+ pub crate_features: Option<Select<BTreeSet<String>>>,
/// Additional data to pass to the target's
/// [data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-data) attribute.
- pub data: Option<BTreeSet<String>>,
+ pub data: Option<Select<BTreeSet<String>>>,
/// An optional glob pattern to set on the
/// [data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-data) attribute.
@@ -253,7 +246,7 @@
/// Additional data to pass to
/// [compile_data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-compile_data) attribute.
- pub compile_data: Option<BTreeSet<String>>,
+ pub compile_data: Option<Select<BTreeSet<String>>>,
/// An optional glob pattern to set on the
/// [compile_data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-compile_data) attribute.
@@ -264,31 +257,31 @@
/// Additional data to pass to the target's
/// [rustc_env](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-rustc_env) attribute.
- pub rustc_env: Option<BTreeMap<String, String>>,
+ pub rustc_env: Option<Select<BTreeMap<String, String>>>,
/// Additional data to pass to the target's
/// [rustc_env_files](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-rustc_env_files) attribute.
- pub rustc_env_files: Option<BTreeSet<String>>,
+ pub rustc_env_files: Option<Select<BTreeSet<String>>>,
/// Additional data to pass to the target's
/// [rustc_flags](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-rustc_flags) attribute.
- pub rustc_flags: Option<Vec<String>>,
+ pub rustc_flags: Option<Select<Vec<String>>>,
/// Additional dependencies to pass to a build script's
/// [deps](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-deps) attribute.
- pub build_script_deps: Option<BTreeSet<StringOrSelect>>,
+ pub build_script_deps: Option<Select<BTreeSet<String>>>,
/// Additional data to pass to a build script's
/// [proc_macro_deps](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-proc_macro_deps) attribute.
- pub build_script_proc_macro_deps: Option<BTreeSet<StringOrSelect>>,
+ pub build_script_proc_macro_deps: Option<Select<BTreeSet<String>>>,
/// Additional data to pass to a build script's
/// [build_script_data](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-data) attribute.
- pub build_script_data: Option<BTreeSet<StringOrSelect>>,
+ pub build_script_data: Option<Select<BTreeSet<String>>>,
/// Additional data to pass to a build script's
/// [tools](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-tools) attribute.
- pub build_script_tools: Option<BTreeSet<StringOrSelect>>,
+ pub build_script_tools: Option<Select<BTreeSet<String>>>,
/// An optional glob pattern to set on the
/// [build_script_data](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-build_script_env) attribute.
@@ -296,18 +289,18 @@
/// Additional environment variables to pass to a build script's
/// [build_script_env](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-rustc_env) attribute.
- pub build_script_env: Option<BTreeMap<String, StringOrSelect>>,
+ pub build_script_env: Option<Select<BTreeMap<String, String>>>,
/// Additional rustc_env flags to pass to a build script's
/// [rustc_env](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-rustc_env) attribute.
- pub build_script_rustc_env: Option<BTreeMap<String, StringOrSelect>>,
+ pub build_script_rustc_env: Option<Select<BTreeMap<String, String>>>,
/// Additional labels to pass to a build script's
/// [toolchains](https://bazel.build/reference/be/common-definitions#common-attributes) attribute.
pub build_script_toolchains: Option<BTreeSet<String>>,
/// Directory to run the crate's build script in. If not set, will run in the manifest directory, otherwise a directory relative to the exec root.
- pub build_script_rundir: Option<String>,
+ pub build_script_rundir: Option<Select<String>>,
/// A scratch pad used to write arbitrary text to target BUILD files.
pub additive_build_file_content: Option<String>,
@@ -358,6 +351,18 @@
type Output = CrateAnnotations;
fn add(self, rhs: Self) -> Self::Output {
+ fn select_merge<T>(lhs: Option<Select<T>>, rhs: Option<Select<T>>) -> Option<Select<T>>
+ where
+ T: Selectable,
+ {
+ match (lhs, rhs) {
+ (Some(lhs), Some(rhs)) => Some(Select::merge(lhs, rhs)),
+ (Some(lhs), None) => Some(lhs),
+ (None, Some(rhs)) => Some(rhs),
+ (None, None) => None,
+ }
+ }
+
let concat_string = |lhs: &mut String, rhs: String| {
*lhs = format!("{lhs}{rhs}");
};
@@ -366,24 +371,24 @@
let output = CrateAnnotations {
gen_binaries: self.gen_binaries.or(rhs.gen_binaries),
gen_build_script: self.gen_build_script.or(rhs.gen_build_script),
- deps: joined_extra_member!(self.deps, rhs.deps, BTreeSet::new, BTreeSet::extend),
- proc_macro_deps: joined_extra_member!(self.proc_macro_deps, rhs.proc_macro_deps, BTreeSet::new, BTreeSet::extend),
- crate_features: joined_extra_member!(self.crate_features, rhs.crate_features, BTreeSet::new, BTreeSet::extend),
- data: joined_extra_member!(self.data, rhs.data, BTreeSet::new, BTreeSet::extend),
+ deps: select_merge(self.deps, rhs.deps),
+ proc_macro_deps: select_merge(self.proc_macro_deps, rhs.proc_macro_deps),
+ crate_features: select_merge(self.crate_features, rhs.crate_features),
+ data: select_merge(self.data, rhs.data),
data_glob: joined_extra_member!(self.data_glob, rhs.data_glob, BTreeSet::new, BTreeSet::extend),
disable_pipelining: self.disable_pipelining || rhs.disable_pipelining,
- compile_data: joined_extra_member!(self.compile_data, rhs.compile_data, BTreeSet::new, BTreeSet::extend),
+ compile_data: select_merge(self.compile_data, rhs.compile_data),
compile_data_glob: joined_extra_member!(self.compile_data_glob, rhs.compile_data_glob, BTreeSet::new, BTreeSet::extend),
- rustc_env: joined_extra_member!(self.rustc_env, rhs.rustc_env, BTreeMap::new, BTreeMap::extend),
- rustc_env_files: joined_extra_member!(self.rustc_env_files, rhs.rustc_env_files, BTreeSet::new, BTreeSet::extend),
- rustc_flags: joined_extra_member!(self.rustc_flags, rhs.rustc_flags, Vec::new, Vec::extend),
- build_script_deps: joined_extra_member!(self.build_script_deps, rhs.build_script_deps, BTreeSet::new, BTreeSet::extend),
- build_script_proc_macro_deps: joined_extra_member!(self.build_script_proc_macro_deps, rhs.build_script_proc_macro_deps, BTreeSet::new, BTreeSet::extend),
- build_script_data: joined_extra_member!(self.build_script_data, rhs.build_script_data, BTreeSet::new, BTreeSet::extend),
- build_script_tools: joined_extra_member!(self.build_script_tools, rhs.build_script_tools, BTreeSet::new, BTreeSet::extend),
+ rustc_env: select_merge(self.rustc_env, rhs.rustc_env),
+ rustc_env_files: select_merge(self.rustc_env_files, rhs.rustc_env_files),
+ rustc_flags: select_merge(self.rustc_flags, rhs.rustc_flags),
+ build_script_deps: select_merge(self.build_script_deps, rhs.build_script_deps),
+ build_script_proc_macro_deps: select_merge(self.build_script_proc_macro_deps, rhs.build_script_proc_macro_deps),
+ build_script_data: select_merge(self.build_script_data, rhs.build_script_data),
+ build_script_tools: select_merge(self.build_script_tools, rhs.build_script_tools),
build_script_data_glob: joined_extra_member!(self.build_script_data_glob, rhs.build_script_data_glob, BTreeSet::new, BTreeSet::extend),
- build_script_env: joined_extra_member!(self.build_script_env, rhs.build_script_env, BTreeMap::new, BTreeMap::extend),
- build_script_rustc_env: joined_extra_member!(self.build_script_rustc_env, rhs.build_script_rustc_env, BTreeMap::new, BTreeMap::extend),
+ build_script_env: select_merge(self.build_script_env, rhs.build_script_env),
+ build_script_rustc_env: select_merge(self.build_script_rustc_env, rhs.build_script_rustc_env),
build_script_toolchains: joined_extra_member!(self.build_script_toolchains, rhs.build_script_toolchains, BTreeSet::new, BTreeSet::extend),
build_script_rundir: self.build_script_rundir.or(rhs.build_script_rundir),
additive_build_file_content: joined_extra_member!(self.additive_build_file_content, rhs.additive_build_file_content, String::new, concat_string),
@@ -424,17 +429,17 @@
#[derive(Debug, Deserialize)]
pub struct AnnotationsProvidedByPackage {
pub gen_build_script: Option<bool>,
- pub data: Option<BTreeSet<String>>,
+ pub data: Option<Select<BTreeSet<String>>>,
pub data_glob: Option<BTreeSet<String>>,
- pub deps: Option<BTreeSet<StringOrSelect>>,
- pub compile_data: Option<BTreeSet<String>>,
+ pub deps: Option<Select<BTreeSet<String>>>,
+ pub compile_data: Option<Select<BTreeSet<String>>>,
pub compile_data_glob: Option<BTreeSet<String>>,
- pub rustc_env: Option<BTreeMap<String, String>>,
- pub rustc_env_files: Option<BTreeSet<String>>,
- pub rustc_flags: Option<Vec<String>>,
- pub build_script_env: Option<BTreeMap<String, StringOrSelect>>,
- pub build_script_rustc_env: Option<BTreeMap<String, StringOrSelect>>,
- pub build_script_rundir: Option<String>,
+ pub rustc_env: Option<Select<BTreeMap<String, String>>>,
+ pub rustc_env_files: Option<Select<BTreeSet<String>>>,
+ pub rustc_flags: Option<Select<Vec<String>>>,
+ pub build_script_env: Option<Select<BTreeMap<String, String>>>,
+ pub build_script_rustc_env: Option<Select<BTreeMap<String, String>>>,
+ pub build_script_rundir: Option<Select<String>>,
pub additive_build_file_content: Option<String>,
pub extra_aliased_targets: Option<BTreeMap<String, String>>,
}
@@ -603,7 +608,7 @@
}
}
-#[derive(Debug, Hash, Clone, PartialEq)]
+#[derive(Debug, Hash, Clone, PartialEq, Eq)]
pub enum GenBinaries {
All,
Some(BTreeSet<String>),
@@ -759,7 +764,7 @@
.unwrap();
assert_eq!(
annotation.crate_features,
- Some(BTreeSet::from(["small_rng".to_owned()]))
+ Some(Select::from_value(BTreeSet::from(["small_rng".to_owned()])))
);
// Global settings
diff --git a/crate_universe/src/context.rs b/crate_universe/src/context.rs
index 8917cc8..2ed8ee0 100644
--- a/crate_universe/src/context.rs
+++ b/crate_universe/src/context.rs
@@ -15,14 +15,14 @@
use crate::context::platforms::resolve_cfg_platforms;
use crate::lockfile::Digest;
use crate::metadata::{Annotations, Dependency};
-use crate::utils::starlark::{Select, SelectList};
+use crate::select::Select;
use crate::utils::target_triple::TargetTriple;
pub use self::crate_context::*;
/// A struct containing information about a Cargo dependency graph in an easily to consume
/// format for rendering reproducible Bazel targets.
-#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)]
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Context {
/// The collective checksum of all inputs to the context
pub checksum: Option<Digest>,
@@ -117,8 +117,9 @@
})
.collect::<Result<BTreeMap<CrateId, String>>>()?;
- let add_crate_ids = |crates: &mut BTreeSet<CrateId>, deps: &SelectList<Dependency>| {
- for dep in deps.iter_all_branches() {
+ let add_crate_ids = |crates: &mut BTreeSet<CrateId>,
+ deps: &Select<BTreeSet<Dependency>>| {
+ for dep in deps.values() {
crates.insert(CrateId::from(
&annotations.metadata.packages[&dep.package_id],
));
@@ -191,7 +192,7 @@
}
/// Create a set of all direct dependencies of workspace member crates.
- pub fn workspace_member_deps(&self) -> BTreeSet<&CrateDependency> {
+ pub fn workspace_member_deps(&self) -> BTreeSet<CrateDependency> {
self.workspace_members
.keys()
.map(move |id| &self.crates[id])
@@ -202,11 +203,7 @@
&ctx.common_attrs.proc_macro_deps,
&ctx.common_attrs.proc_macro_deps_dev,
])
- .flat_map(|deps| {
- deps.configurations().into_iter().flat_map(move |conf| {
- deps.get_iter(conf).expect("Lookup should be guaranteed")
- })
- })
+ .flat_map(|deps| deps.values())
})
.collect()
}
diff --git a/crate_universe/src/context/crate_context.rs b/crate_universe/src/context/crate_context.rs
index 3de4dd4..4c009ad 100644
--- a/crate_universe/src/context/crate_context.rs
+++ b/crate_universe/src/context/crate_context.rs
@@ -6,11 +6,12 @@
use serde::{Deserialize, Serialize};
use crate::config::{AliasRule, CrateId, GenBinaries};
-use crate::metadata::{CrateAnnotation, Dependency, PairredExtras, SourceAnnotation};
+use crate::metadata::{CrateAnnotation, Dependency, PairedExtras, SourceAnnotation};
+use crate::select::Select;
use crate::utils::sanitize_module_name;
-use crate::utils::starlark::{Glob, SelectList, SelectMap, SelectStringDict, SelectStringList};
+use crate::utils::starlark::Glob;
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
pub struct CrateDependency {
/// The [CrateId] of the dependency
pub id: CrateId,
@@ -58,7 +59,7 @@
BuildScript(TargetAttributes),
}
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CrateFeatures {
// Not populated going forward. This just exists for backward compatiblity
@@ -66,26 +67,20 @@
LegacySet(BTreeSet<String>),
/// Map from target triplet to set of features.
- SelectList(SelectList<String>),
+ SelectSet(Select<BTreeSet<String>>),
}
impl Default for CrateFeatures {
fn default() -> Self {
- CrateFeatures::SelectList(Default::default())
+ CrateFeatures::SelectSet(Default::default())
}
}
-impl From<&CrateFeatures> for SelectList<String> {
+impl From<&CrateFeatures> for Select<BTreeSet<String>> {
fn from(value: &CrateFeatures) -> Self {
match value {
- CrateFeatures::LegacySet(s) => {
- let mut sl = SelectList::default();
- for v in s {
- sl.insert(v.clone(), None);
- }
- sl
- }
- CrateFeatures::SelectList(sl) => sl.clone(),
+ CrateFeatures::LegacySet(s) => Select::from_value(s.clone()),
+ CrateFeatures::SelectSet(sl) => sl.clone(),
}
}
}
@@ -94,18 +89,18 @@
pub fn is_empty(&self) -> bool {
match self {
CrateFeatures::LegacySet(s) => s.is_empty(),
- CrateFeatures::SelectList(sl) => sl.is_empty(),
+ CrateFeatures::SelectSet(sl) => sl.is_empty(),
}
}
}
/// A set of attributes common to most `rust_library`, `rust_proc_macro`, and other
/// [core rules of `rules_rust`](https://bazelbuild.github.io/rules_rust/defs.html).
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(default)]
pub struct CommonAttributes {
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub compile_data: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub compile_data: Select<BTreeSet<String>>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub compile_data_glob: BTreeSet<String>,
@@ -113,43 +108,43 @@
#[serde(skip_serializing_if = "CrateFeatures::is_empty")]
pub crate_features: CrateFeatures,
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub data: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub data: Select<BTreeSet<String>>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub data_glob: BTreeSet<String>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub deps: SelectList<CrateDependency>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub deps: Select<BTreeSet<CrateDependency>>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub extra_deps: SelectList<String>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub extra_deps: Select<BTreeSet<String>>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub deps_dev: SelectList<CrateDependency>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub deps_dev: Select<BTreeSet<CrateDependency>>,
pub edition: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub linker_script: Option<String>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub proc_macro_deps: SelectList<CrateDependency>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub proc_macro_deps: Select<BTreeSet<CrateDependency>>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub extra_proc_macro_deps: SelectList<String>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub extra_proc_macro_deps: Select<BTreeSet<String>>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub proc_macro_deps_dev: SelectList<CrateDependency>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub proc_macro_deps_dev: Select<BTreeSet<CrateDependency>>,
- #[serde(skip_serializing_if = "SelectStringDict::is_empty")]
- pub rustc_env: SelectStringDict,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub rustc_env: Select<BTreeMap<String, String>>,
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub rustc_env_files: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub rustc_env_files: Select<BTreeSet<String>>,
- #[serde(skip_serializing_if = "Vec::is_empty")]
- pub rustc_flags: Vec<String>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub rustc_flags: Select<Vec<String>>,
pub version: String,
@@ -185,23 +180,23 @@
// Build script attributes. See
// https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(default)]
pub struct BuildScriptAttributes {
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub compile_data: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub compile_data: Select<BTreeSet<String>>,
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub data: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub data: Select<BTreeSet<String>>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub data_glob: BTreeSet<String>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub deps: SelectList<CrateDependency>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub deps: Select<BTreeSet<CrateDependency>>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub extra_deps: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub extra_deps: Select<BTreeSet<String>>,
// TODO: refactor a crate with a build.rs file from two into three bazel
// rules in order to deduplicate link_dep information. Currently as the
@@ -220,35 +215,35 @@
// in which either all of the deps are in crate dependencies, or just the
// normal dependencies. This could be handled a special rule, or just using
// a `filegroup`.
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub link_deps: SelectList<CrateDependency>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub link_deps: Select<BTreeSet<CrateDependency>>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub extra_link_deps: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub extra_link_deps: Select<BTreeSet<String>>,
- #[serde(skip_serializing_if = "SelectStringDict::is_empty")]
- pub build_script_env: SelectStringDict,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub build_script_env: Select<BTreeMap<String, String>>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub rundir: Option<String>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub rundir: Select<String>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub extra_proc_macro_deps: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub extra_proc_macro_deps: Select<BTreeSet<String>>,
- #[serde(skip_serializing_if = "SelectList::is_empty")]
- pub proc_macro_deps: SelectList<CrateDependency>,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub proc_macro_deps: Select<BTreeSet<CrateDependency>>,
- #[serde(skip_serializing_if = "SelectStringDict::is_empty")]
- pub rustc_env: SelectStringDict,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub rustc_env: Select<BTreeMap<String, String>>,
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub rustc_flags: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub rustc_flags: Select<Vec<String>>,
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub rustc_env_files: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub rustc_env_files: Select<BTreeSet<String>>,
- #[serde(skip_serializing_if = "SelectStringList::is_empty")]
- pub tools: SelectStringList,
+ #[serde(skip_serializing_if = "Select::is_empty")]
+ pub tools: Select<BTreeSet<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub links: Option<String>,
@@ -282,7 +277,7 @@
}
}
-#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)]
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(default)]
pub struct CrateContext {
/// The package name of the current crate
@@ -336,8 +331,8 @@
annotation: &CrateAnnotation,
packages: &BTreeMap<PackageId, Package>,
source_annotations: &BTreeMap<PackageId, SourceAnnotation>,
- extras: &BTreeMap<CrateId, PairredExtras>,
- features: &BTreeMap<CrateId, SelectList<String>>,
+ extras: &BTreeMap<CrateId, PairedExtras>,
+ features: &BTreeMap<CrateId, Select<BTreeSet<String>>>,
include_binaries: bool,
include_build_scripts: bool,
) -> Self {
@@ -371,10 +366,8 @@
// Gather all "common" attributes
let mut common_attrs = CommonAttributes {
- crate_features: CrateFeatures::SelectList(
- features
- .get(¤t_crate_id)
- .map_or_else(SelectList::default, |f| f.clone()),
+ crate_features: CrateFeatures::SelectSet(
+ features.get(¤t_crate_id).cloned().unwrap_or_default(),
),
deps,
deps_dev,
@@ -490,30 +483,29 @@
.with_overrides(extras)
}
- fn with_overrides(mut self, extras: &BTreeMap<CrateId, PairredExtras>) -> Self {
+ fn with_overrides(mut self, extras: &BTreeMap<CrateId, PairedExtras>) -> Self {
let id = CrateId::new(self.name.clone(), self.version.clone());
// Insert all overrides/extras
- if let Some(pairred_override) = extras.get(&id) {
- let crate_extra = &pairred_override.crate_extra;
+ if let Some(paired_override) = extras.get(&id) {
+ let crate_extra = &paired_override.crate_extra;
// Deps
if let Some(extra) = &crate_extra.deps {
- self.common_attrs.extra_deps.extend(extra.iter().cloned());
+ self.common_attrs.extra_deps =
+ Select::merge(self.common_attrs.extra_deps, extra.clone());
}
// Proc macro deps
if let Some(extra) = &crate_extra.proc_macro_deps {
- self.common_attrs
- .extra_proc_macro_deps
- .extend(extra.iter().cloned());
+ self.common_attrs.extra_proc_macro_deps =
+ Select::merge(self.common_attrs.extra_proc_macro_deps, extra.clone());
}
// Compile data
if let Some(extra) = &crate_extra.compile_data {
- for data in extra.iter() {
- self.common_attrs.compile_data.insert(data.clone(), None);
- }
+ self.common_attrs.compile_data =
+ Select::merge(self.common_attrs.compile_data, extra.clone());
}
// Compile data glob
@@ -524,20 +516,20 @@
// Crate features
if let Some(extra) = &crate_extra.crate_features {
match &mut self.common_attrs.crate_features {
- CrateFeatures::LegacySet(s) => s.append(&mut extra.clone()),
- CrateFeatures::SelectList(sl) => {
- for data in extra.iter() {
- sl.insert(data.clone(), None);
- }
- }
+ CrateFeatures::LegacySet(s) => s.extend(
+ extra
+ .items()
+ .into_iter()
+ .filter(|(configuration, _)| configuration.is_none())
+ .map(|(_, value)| value),
+ ),
+ CrateFeatures::SelectSet(sl) => *sl = Select::merge(sl.clone(), extra.clone()),
}
}
// Data
if let Some(extra) = &crate_extra.data {
- for data in extra.iter() {
- self.common_attrs.data.insert(data.clone(), None);
- }
+ self.common_attrs.data = Select::merge(self.common_attrs.data, extra.clone());
}
// Data glob
@@ -552,48 +544,48 @@
// Rustc flags
if let Some(extra) = &crate_extra.rustc_flags {
- self.common_attrs.rustc_flags.append(&mut extra.clone());
+ self.common_attrs.rustc_flags =
+ Select::merge(self.common_attrs.rustc_flags, extra.clone());
}
// Rustc env
if let Some(extra) = &crate_extra.rustc_env {
- self.common_attrs.rustc_env.extend(extra.clone(), None);
+ self.common_attrs.rustc_env =
+ Select::merge(self.common_attrs.rustc_env, extra.clone());
}
// Rustc env files
if let Some(extra) = &crate_extra.rustc_env_files {
- for data in extra.iter() {
- self.common_attrs.rustc_env_files.insert(data.clone(), None);
- }
+ self.common_attrs.rustc_env_files =
+ Select::merge(self.common_attrs.rustc_env_files, extra.clone());
}
// Build script Attributes
if let Some(attrs) = &mut self.build_script_attrs {
// Deps
if let Some(extra) = &crate_extra.build_script_deps {
- attrs.extra_deps.extend(extra.iter().cloned())
+ attrs.extra_deps = Select::merge(attrs.extra_deps.clone(), extra.clone());
}
// Proc macro deps
if let Some(extra) = &crate_extra.build_script_proc_macro_deps {
- attrs.extra_proc_macro_deps.extend(extra.iter().cloned());
+ attrs.extra_proc_macro_deps =
+ Select::merge(attrs.extra_proc_macro_deps.clone(), extra.clone());
}
// Data
if let Some(extra) = &crate_extra.build_script_data {
- attrs.data.extend(extra.iter().cloned());
+ attrs.data = Select::merge(attrs.data.clone(), extra.clone());
}
// Tools
if let Some(extra) = &crate_extra.build_script_tools {
- attrs.tools.extend(extra.iter().cloned());
+ attrs.tools = Select::merge(attrs.tools.clone(), extra.clone());
}
// Toolchains
if let Some(extra) = &crate_extra.build_script_toolchains {
- for data in extra {
- attrs.toolchains.insert(data.clone());
- }
+ attrs.toolchains.extend(extra.iter().cloned());
}
// Data glob
@@ -603,20 +595,17 @@
// Rustc env
if let Some(extra) = &crate_extra.build_script_rustc_env {
- attrs
- .rustc_env
- .extend_from_string_or_select(extra.iter().map(clone_tuple));
+ attrs.rustc_env = Select::merge(attrs.rustc_env.clone(), extra.clone());
}
// Build script env
if let Some(extra) = &crate_extra.build_script_env {
- attrs
- .build_script_env
- .extend_from_string_or_select(extra.iter().map(clone_tuple))
+ attrs.build_script_env =
+ Select::merge(attrs.build_script_env.clone(), extra.clone());
}
if let Some(rundir) = &crate_extra.build_script_rundir {
- attrs.rundir = Some(rundir.clone());
+ attrs.rundir = Select::merge(attrs.rundir.clone(), rundir.clone());
}
}
@@ -677,7 +666,7 @@
/// Determine whether or not a crate __should__ include a build script
/// (build.rs) if it happens to have one.
fn crate_includes_build_script(
- package_extra: Option<(&CrateId, &PairredExtras)>,
+ package_extra: Option<(&CrateId, &PairedExtras)>,
default_generate_build_script: bool,
) -> bool {
// If the crate has extra settings, which explicitly set `gen_build_script`, always use
@@ -766,11 +755,6 @@
}
}
-fn clone_tuple<V1: Clone, V2: Clone>(t: (&V1, &V2)) -> (V1, V2) {
- let (v1, v2) = t;
- (v1.clone(), v2.clone())
-}
-
#[cfg(test)]
mod test {
use super::*;
@@ -831,7 +815,7 @@
let mut pairred_extras = BTreeMap::new();
pairred_extras.insert(
CrateId::new("common".to_owned(), "0.1.0".to_owned()),
- PairredExtras {
+ PairedExtras {
package_id,
crate_extra: CrateAnnotations {
gen_binaries: Some(GenBinaries::All),
diff --git a/crate_universe/src/context/platforms.rs b/crate_universe/src/context/platforms.rs
index ff242a9..f3bc160 100644
--- a/crate_universe/src/context/platforms.rs
+++ b/crate_universe/src/context/platforms.rs
@@ -5,7 +5,6 @@
use cfg_expr::{Expression, Predicate};
use crate::context::CrateContext;
-use crate::utils::starlark::Select;
use crate::utils::target_triple::TargetTriple;
/// Walk through all dependencies in a [CrateContext] list for all configuration specific
@@ -20,26 +19,21 @@
.iter()
.flat_map(|ctx| {
let attr = &ctx.common_attrs;
- attr.deps
- .configurations()
- .into_iter()
- .chain(attr.deps_dev.configurations())
- .chain(attr.proc_macro_deps.configurations())
- .chain(attr.proc_macro_deps_dev.configurations())
- // Chain the build dependencies if some are defined
- .chain(if let Some(attr) = &ctx.build_script_attrs {
- attr.deps
- .configurations()
- .into_iter()
- .chain(attr.proc_macro_deps.configurations())
- .collect::<BTreeSet<Option<&String>>>()
- .into_iter()
- } else {
- BTreeSet::new().into_iter()
- })
- .flatten()
+ let mut configurations = BTreeSet::new();
+
+ configurations.extend(attr.deps.configurations());
+ configurations.extend(attr.deps_dev.configurations());
+ configurations.extend(attr.proc_macro_deps.configurations());
+ configurations.extend(attr.proc_macro_deps_dev.configurations());
+
+ // Chain the build dependencies if some are defined
+ if let Some(attr) = &ctx.build_script_attrs {
+ configurations.extend(attr.deps.configurations());
+ configurations.extend(attr.proc_macro_deps.configurations());
+ }
+
+ configurations
})
- .cloned()
.collect();
// Generate target information for each triple string
@@ -104,11 +98,10 @@
Ok((cfg, triples))
})
.collect::<Result<BTreeMap<String, BTreeSet<TargetTriple>>>>()?;
+ // Insert identity relationships.
for target_triple in supported_platform_triples.iter() {
- let target = get_builtin_target_by_triple(&target_triple.to_cargo())
- .expect("TargetTriple has already been validated by `cargo tree` invocation");
conditions
- .entry(target.triple.to_string())
+ .entry(target_triple.to_bazel())
.or_default()
.insert(target_triple.clone());
}
@@ -120,7 +113,7 @@
use crate::config::CrateId;
use crate::context::crate_context::CrateDependency;
use crate::context::CommonAttributes;
- use crate::utils::starlark::SelectList;
+ use crate::select::Select;
use super::*;
@@ -134,7 +127,7 @@
#[test]
fn resolve_no_targeted() {
- let mut deps = SelectList::default();
+ let mut deps: Select<BTreeSet<CrateDependency>> = Select::default();
deps.insert(
CrateDependency {
id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()),
@@ -180,7 +173,7 @@
}
fn mock_resolve_context(configuration: String) -> CrateContext {
- let mut deps = SelectList::default();
+ let mut deps: Select<BTreeSet<CrateDependency>> = Select::default();
deps.insert(
CrateDependency {
id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()),
@@ -254,7 +247,7 @@
#[test]
fn resolve_platforms() {
let configuration = r#"x86_64-unknown-linux-gnu"#.to_owned();
- let mut deps = SelectList::default();
+ let mut deps: Select<BTreeSet<CrateDependency>> = Select::default();
deps.insert(
CrateDependency {
id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()),
@@ -308,7 +301,7 @@
#[test]
fn resolve_unsupported_targeted() {
let configuration = r#"cfg(target = "x86_64-unknown-unknown")"#.to_owned();
- let mut deps = SelectList::default();
+ let mut deps: Select<BTreeSet<CrateDependency>> = Select::default();
deps.insert(
CrateDependency {
id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()),
diff --git a/crate_universe/src/lib.rs b/crate_universe/src/lib.rs
index e6fbd6f..12d9633 100644
--- a/crate_universe/src/lib.rs
+++ b/crate_universe/src/lib.rs
@@ -7,6 +7,7 @@
mod lockfile;
mod metadata;
mod rendering;
+mod select;
mod splicing;
mod utils;
diff --git a/crate_universe/src/metadata.rs b/crate_universe/src/metadata.rs
index cee58bf..031cacb 100644
--- a/crate_universe/src/metadata.rs
+++ b/crate_universe/src/metadata.rs
@@ -20,7 +20,7 @@
use crate::config::CrateId;
use crate::lockfile::Digest;
-use crate::utils::starlark::SelectList;
+use crate::select::Select;
use crate::utils::target_triple::TargetTriple;
pub use self::dependency::*;
@@ -459,7 +459,7 @@
&self,
manifest_path: &Path,
target_triples: &BTreeSet<TargetTriple>,
- ) -> Result<BTreeMap<CrateId, SelectList<String>>> {
+ ) -> Result<BTreeMap<CrateId, Select<BTreeSet<String>>>> {
debug!(
"Generating features for manifest {}",
manifest_path.display()
@@ -530,7 +530,7 @@
.insert(target_triple.clone(), features);
}
}
- let mut result = BTreeMap::<CrateId, SelectList<String>>::new();
+ let mut result = BTreeMap::<CrateId, Select<BTreeSet<String>>>::new();
for (crate_id, features) in crate_features.into_iter() {
let common = features
.iter()
@@ -542,18 +542,18 @@
},
)
.unwrap_or_default();
- let mut select_list = SelectList::default();
+ let mut select: Select<BTreeSet<String>> = Select::default();
for (target_triple, fs) in features {
if fs != common {
for f in fs {
- select_list.insert(f, Some(target_triple.to_bazel()));
+ select.insert(f, Some(target_triple.to_bazel()));
}
}
}
for f in common {
- select_list.insert(f, None);
+ select.insert(f, None);
}
- result.insert(crate_id, select_list);
+ result.insert(crate_id, select);
}
Ok(result)
}
diff --git a/crate_universe/src/metadata/dependency.rs b/crate_universe/src/metadata/dependency.rs
index b824da5..6987125 100644
--- a/crate_universe/src/metadata/dependency.rs
+++ b/crate_universe/src/metadata/dependency.rs
@@ -1,4 +1,5 @@
//! Gathering dependencies is the largest part of annotating.
+use std::collections::BTreeSet;
use anyhow::{bail, Result};
use cargo_metadata::{
@@ -7,11 +8,11 @@
use cargo_platform::Platform;
use serde::{Deserialize, Serialize};
+use crate::select::Select;
use crate::utils::sanitize_module_name;
-use crate::utils::starlark::{Select, SelectList};
/// A representation of a crate dependency
-#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Clone)]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
pub struct Dependency {
/// The PackageId of the target
pub package_id: PackageId,
@@ -26,13 +27,13 @@
/// A collection of [Dependency]s sorted by dependency kind.
#[derive(Debug, Default, Serialize, Deserialize)]
pub struct DependencySet {
- pub normal_deps: SelectList<Dependency>,
- pub normal_dev_deps: SelectList<Dependency>,
- pub proc_macro_deps: SelectList<Dependency>,
- pub proc_macro_dev_deps: SelectList<Dependency>,
- pub build_deps: SelectList<Dependency>,
- pub build_link_deps: SelectList<Dependency>,
- pub build_proc_macro_deps: SelectList<Dependency>,
+ pub normal_deps: Select<BTreeSet<Dependency>>,
+ pub normal_dev_deps: Select<BTreeSet<Dependency>>,
+ pub proc_macro_deps: Select<BTreeSet<Dependency>>,
+ pub proc_macro_dev_deps: Select<BTreeSet<Dependency>>,
+ pub build_deps: Select<BTreeSet<Dependency>>,
+ pub build_link_deps: Select<BTreeSet<Dependency>>,
+ pub build_proc_macro_deps: Select<BTreeSet<Dependency>>,
}
impl DependencySet {
@@ -96,19 +97,15 @@
// https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key
// https://doc.rust-lang.org/cargo/reference/build-scripts.html#-sys-packages
// https://doc.rust-lang.org/cargo/reference/build-script-examples.html#using-another-sys-crate
- let mut build_link_deps = SelectList::<Dependency>::default();
- normal_deps.configurations().into_iter().for_each(|config| {
- normal_deps
- .get_iter(config)
- // Iterating over known key should be safe
- .unwrap()
- // Add any normal dependency to build dependencies that are associated `*-sys` crates
- .for_each(|dep| {
- if metadata[&dep.package_id].links.is_some() {
- build_link_deps.insert(dep.clone(), config.cloned())
- }
- });
- });
+ let mut build_link_deps: Select<BTreeSet<Dependency>> = Select::default();
+ for (configuration, dependency) in normal_deps
+ .items()
+ .into_iter()
+ .filter(|(_, dependency)| metadata[&dependency.package_id].links.is_some())
+ {
+ // Add any normal dependency to build dependencies that are associated `*-sys` crates
+ build_link_deps.insert(dependency.clone(), configuration.clone());
+ }
Self {
normal_deps,
@@ -160,8 +157,8 @@
deps: Vec<&NodeDep>,
metadata: &cargo_metadata::Metadata,
kind: DependencyKind,
-) -> SelectList<Dependency> {
- let mut selectable = SelectList::default();
+) -> Select<BTreeSet<Dependency>> {
+ let mut select: Select<BTreeSet<Dependency>> = Select::default();
for dep in deps.into_iter() {
let dep_pkg = &metadata[&dep.pkg];
@@ -171,12 +168,13 @@
for kind_info in &dep.dep_kinds {
if is_optional_crate_enabled(node, dep, kind_info.target.as_ref(), metadata, kind) {
- selectable.insert(
- Dependency {
- package_id: dep.pkg.clone(),
- target_name: target_name.clone(),
- alias: alias.clone(),
- },
+ let dependency = Dependency {
+ package_id: dep.pkg.clone(),
+ target_name: target_name.clone(),
+ alias: alias.clone(),
+ };
+ select.insert(
+ dependency,
kind_info
.target
.as_ref()
@@ -186,7 +184,7 @@
}
}
- selectable
+ select
}
fn is_lib_package(package: &Package) -> bool {
@@ -437,23 +435,25 @@
let dependencies = DependencySet::new_for_node(openssl_node, &metadata);
- let normal_sys_crate = dependencies
- .normal_deps
- .get_iter(None)
- .unwrap()
- .find(|dep| {
- let pkg = &metadata[&dep.package_id];
- pkg.name == "openssl-sys"
- });
+ let normal_sys_crate =
+ dependencies
+ .normal_deps
+ .items()
+ .into_iter()
+ .find(|(configuration, dep)| {
+ let pkg = &metadata[&dep.package_id];
+ configuration.is_none() && pkg.name == "openssl-sys"
+ });
- let link_dep_sys_crate = dependencies
- .build_link_deps
- .get_iter(None)
- .unwrap()
- .find(|dep| {
- let pkg = &metadata[&dep.package_id];
- pkg.name == "openssl-sys"
- });
+ let link_dep_sys_crate =
+ dependencies
+ .build_link_deps
+ .items()
+ .into_iter()
+ .find(|(configuration, dep)| {
+ let pkg = &metadata[&dep.package_id];
+ configuration.is_none() && pkg.name == "openssl-sys"
+ });
// sys crates like `openssl-sys` should always be dependencies of any
// crate which matches it's name minus the `-sys` suffix
@@ -471,16 +471,9 @@
// Collect build dependencies into a set
let build_deps: BTreeSet<String> = libssh2_depset
.build_deps
- .configurations()
+ .values()
.into_iter()
- .flat_map(|conf| {
- libssh2_depset
- .build_deps
- .get_iter(conf)
- .unwrap()
- .map(|dep| dep.package_id.repr.clone())
- .collect::<Vec<String>>()
- })
+ .map(|dep| dep.package_id.repr)
.collect();
assert_eq!(
@@ -496,16 +489,9 @@
// Collect normal dependencies into a set
let normal_deps: BTreeSet<String> = libssh2_depset
.normal_deps
- .configurations()
+ .values()
.into_iter()
- .flat_map(|conf| {
- libssh2_depset
- .normal_deps
- .get_iter(conf)
- .unwrap()
- .map(|dep| dep.package_id.to_string())
- .collect::<Vec<String>>()
- })
+ .map(|dep| dep.package_id.to_string())
.collect();
assert_eq!(
@@ -531,19 +517,18 @@
let aliases_node = find_metadata_node("aliases", &metadata);
let dependencies = DependencySet::new_for_node(aliases_node, &metadata);
- let aliases: Vec<&Dependency> = dependencies
+ let aliases: Vec<Dependency> = dependencies
.normal_deps
- .get_iter(None)
- .unwrap()
- .filter(|dep| dep.alias.is_some())
+ .items()
+ .into_iter()
+ .filter(|(configuration, dep)| configuration.is_none() && dep.alias.is_some())
+ .map(|(_, dep)| dep)
.collect();
assert_eq!(aliases.len(), 2);
- let expected: BTreeSet<String> = aliases
- .into_iter()
- .map(|dep| dep.alias.as_ref().unwrap().clone())
- .collect();
+ let expected: BTreeSet<String> =
+ aliases.into_iter().map(|dep| dep.alias.unwrap()).collect();
assert_eq!(
expected,
@@ -558,16 +543,19 @@
let node = find_metadata_node("crate-types", &metadata);
let dependencies = DependencySet::new_for_node(node, &metadata);
- let rlib_deps: Vec<&Dependency> = dependencies
+ let rlib_deps: Vec<Dependency> = dependencies
.normal_deps
- .get_iter(None)
- .unwrap()
- .filter(|dep| {
+ .items()
+ .into_iter()
+ .filter(|(configuration, dep)| {
let pkg = &metadata[&dep.package_id];
- pkg.targets
- .iter()
- .any(|t| t.crate_types.contains(&"rlib".to_owned()))
+ configuration.is_none()
+ && pkg
+ .targets
+ .iter()
+ .any(|t| t.crate_types.contains(&"rlib".to_owned()))
})
+ .map(|(_, dep)| dep)
.collect();
// Currently the only expected __explicitly__ "rlib" target in this metadata is `sysinfo`.
@@ -584,26 +572,19 @@
let node = find_metadata_node("cpufeatures", &metadata);
let dependencies = DependencySet::new_for_node(node, &metadata);
- let libc_cfgs: BTreeSet<String> = dependencies
+ let libc_cfgs: BTreeSet<Option<String>> = dependencies
.normal_deps
- .configurations()
+ .items()
.into_iter()
- .flat_map(|conf| {
- dependencies
- .normal_deps
- .get_iter(conf)
- .expect("Iterating over known keys should never panic")
- .filter(|dep| dep.target_name == "libc")
- .map(move |_| conf.cloned())
- })
- .flatten()
+ .filter(|(_, dep)| dep.target_name == "libc")
+ .map(|(configuration, _)| configuration)
.collect();
assert_eq!(
BTreeSet::from([
- "aarch64-linux-android".to_owned(),
- "cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))".to_owned(),
- "cfg(all(target_arch = \"aarch64\", target_vendor = \"apple\"))".to_owned(),
+ Some("aarch64-linux-android".to_owned()),
+ Some("cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))".to_owned()),
+ Some("cfg(all(target_arch = \"aarch64\", target_vendor = \"apple\"))".to_owned()),
]),
libc_cfgs,
);
@@ -618,17 +599,17 @@
let lib_deps: Vec<_> = dependencies
.proc_macro_deps
- .get_iter(None)
- .unwrap()
- .map(|dep| dep.target_name.clone())
+ .items()
+ .into_iter()
+ .map(|(_, dep)| dep.target_name)
.collect();
assert_eq!(lib_deps, vec!["paste"]);
let build_deps: Vec<_> = dependencies
.build_proc_macro_deps
- .get_iter(None)
- .unwrap()
- .map(|dep| dep.target_name.clone())
+ .items()
+ .into_iter()
+ .map(|(_, dep)| dep.target_name)
.collect();
assert_eq!(build_deps, vec!["paste"]);
}
@@ -642,9 +623,10 @@
assert!(!dependencies
.normal_deps
- .get_iter(None)
- .expect("Iterating over known keys should never panic")
- .any(|dep| { dep.target_name == "is-terminal" || dep.target_name == "termcolor" }));
+ .items()
+ .iter()
+ .any(|(configuration, dep)| configuration.is_none()
+ && (dep.target_name == "is-terminal" || dep.target_name == "termcolor")));
}
#[test]
@@ -655,9 +637,9 @@
let serde_with_depset = DependencySet::new_for_node(serde_with, &metadata);
assert!(!serde_with_depset
.normal_deps
- .get_iter(None)
- .expect("Iterating over known keys should never panic")
- .any(|dep| { dep.target_name == "indexmap" }));
+ .items()
+ .iter()
+ .any(|(configuration, dep)| configuration.is_none() && dep.target_name == "indexmap"));
}
#[test]
@@ -669,11 +651,10 @@
assert_eq!(
clap_depset
.normal_deps
- .get_iter(None)
- .expect("Iterating over known keys should never panic")
- .filter(|dep| {
- dep.target_name == "is-terminal" || dep.target_name == "termcolor"
- })
+ .items()
+ .iter()
+ .filter(|(configuration, dep)| configuration.is_none()
+ && (dep.target_name == "is-terminal" || dep.target_name == "termcolor"))
.count(),
2
);
@@ -684,23 +665,27 @@
// mio is not present in the common list of dependencies
assert!(!notify_depset
.normal_deps
- .get_iter(None)
- .expect("Iterating over known keys should never panic")
- .any(|dep| { dep.target_name == "mio" }));
+ .items()
+ .iter()
+ .any(|(configuration, dep)| configuration.is_none() && dep.target_name == "mio"));
// mio is a dependency on linux
assert!(notify_depset
.normal_deps
- .get_iter(Some(&"cfg(target_os = \"linux\")".to_string()))
- .expect("Iterating over known keys should never panic")
- .any(|dep| { dep.target_name == "mio" }));
+ .items()
+ .iter()
+ .any(|(configuration, dep)| configuration.as_deref()
+ == Some("cfg(target_os = \"linux\")")
+ && dep.target_name == "mio"));
// mio is marked optional=true on macos
assert!(!notify_depset
.normal_deps
- .get_iter(Some(&"cfg(target_os = \"macos\")".to_string()))
- .expect("Iterating over known keys should never panic")
- .any(|dep| { dep.target_name == "mio" }));
+ .items()
+ .iter()
+ .any(|(configuration, dep)| configuration.as_deref()
+ == Some("cfg(target_os = \"macos\")")
+ && dep.target_name == "mio"));
}
#[test]
@@ -712,15 +697,15 @@
assert!(!dependencies
.normal_deps
- .get_iter(None)
- .expect("Iterating over known keys should never panic")
- .any(|dep| dep.target_name == "serde"));
+ .items()
+ .iter()
+ .any(|(configuration, dep)| configuration.is_none() && dep.target_name == "serde"));
assert!(dependencies
.build_deps
- .get_iter(None)
- .expect("Iterating over known keys should never panic")
- .any(|dep| dep.target_name == "serde"));
+ .items()
+ .iter()
+ .any(|(configuration, dep)| configuration.is_none() && dep.target_name == "serde"));
}
#[test]
@@ -732,9 +717,9 @@
assert_eq!(
p256_depset
.normal_deps
- .get_iter(None)
- .expect("Iterating over known keys should never panic")
- .filter(|dep| { dep.target_name == "ecdsa" })
+ .items()
+ .iter()
+ .filter(|(configuration, dep)| configuration.is_none() && dep.target_name == "ecdsa")
.count(),
1
);
diff --git a/crate_universe/src/metadata/metadata_annotation.rs b/crate_universe/src/metadata/metadata_annotation.rs
index 4f22dbe..12645f6 100644
--- a/crate_universe/src/metadata/metadata_annotation.rs
+++ b/crate_universe/src/metadata/metadata_annotation.rs
@@ -11,8 +11,8 @@
use crate::config::{Commitish, Config, CrateAnnotations, CrateId};
use crate::metadata::dependency::DependencySet;
+use crate::select::Select;
use crate::splicing::{SourceInfo, WorkspaceMetadata};
-use crate::utils::starlark::SelectList;
pub type CargoMetadata = cargo_metadata::Metadata;
pub type CargoLockfile = cargo_lock::Lockfile;
@@ -337,8 +337,8 @@
}
/// A pairing of a crate's package identifier to its annotations.
-#[derive(Debug, Serialize, Deserialize)]
-pub struct PairredExtras {
+#[derive(Debug)]
+pub struct PairedExtras {
/// The crate's package identifier
pub package_id: cargo_metadata::PackageId,
@@ -347,7 +347,7 @@
}
/// A collection of data which has been processed for optimal use in generating Bazel targets.
-#[derive(Debug, Default, Serialize, Deserialize)]
+#[derive(Debug, Default)]
pub struct Annotations {
/// Annotated Cargo metadata
pub metadata: MetadataAnnotation,
@@ -359,10 +359,10 @@
pub config: Config,
/// Pairred crate annotations
- pub pairred_extras: BTreeMap<CrateId, PairredExtras>,
+ pub pairred_extras: BTreeMap<CrateId, PairedExtras>,
/// Feature set for each target triplet and crate.
- pub features: BTreeMap<CrateId, SelectList<String>>,
+ pub features: BTreeMap<CrateId, Select<BTreeSet<String>>>,
}
impl Annotations {
@@ -404,7 +404,7 @@
} else {
Some((
CrateId::new(pkg.name.clone(), pkg.version.to_string()),
- PairredExtras {
+ PairedExtras {
package_id: pkg_id.clone(),
crate_extra,
},
@@ -567,11 +567,10 @@
fn defaults_from_package_metadata() {
let crate_id = CrateId::new("has_package_metadata".to_owned(), "0.0.0".to_owned());
let annotations = CrateAnnotations {
- rustc_env: Some({
- let mut rustc_env = BTreeMap::new();
- rustc_env.insert("BAR".to_owned(), "bar is set".to_owned());
- rustc_env
- }),
+ rustc_env: Some(Select::from_value(BTreeMap::from([(
+ "BAR".to_owned(),
+ "bar is set".to_owned(),
+ )]))),
..CrateAnnotations::default()
};
diff --git a/crate_universe/src/rendering.rs b/crate_universe/src/rendering.rs
index 33ec2b5..095799f 100644
--- a/crate_universe/src/rendering.rs
+++ b/crate_universe/src/rendering.rs
@@ -16,11 +16,12 @@
use crate::context::crate_context::{CrateContext, CrateDependency, Rule};
use crate::context::{Context, TargetAttributes};
use crate::rendering::template_engine::TemplateEngine;
+use crate::select::Select;
use crate::splicing::default_splicing_package_crate_id;
use crate::utils::starlark::{
self, Alias, CargoBuildScript, CommonAttrs, Data, ExportsFiles, Filegroup, Glob, Label, Load,
- Package, RustBinary, RustLibrary, RustProcMacro, Select, SelectDict, SelectList, SelectMap,
- Starlark, TargetCompatibleWith,
+ Package, RustBinary, RustLibrary, RustProcMacro, SelectDict, SelectList, SelectScalar,
+ SelectSet, Starlark, TargetCompatibleWith,
};
use crate::utils::target_triple::TargetTriple;
use crate::utils::{self, sanitize_repository_name};
@@ -185,7 +186,7 @@
dependencies.push(Alias {
rule: alias_rule.rule(),
// If duplicates exist, include version to disambiguate them.
- name: if context.has_duplicate_workspace_member_dep(dep) {
+ name: if context.has_duplicate_workspace_member_dep(&dep) {
format!("{}-{}", rename, krate.version)
} else {
rename.clone()
@@ -378,9 +379,6 @@
krate: &CrateContext,
target: &TargetAttributes,
) -> Result<CargoBuildScript> {
- let empty_set = BTreeSet::<String>::new();
- let empty_list = SelectList::<String>::default();
- let empty_deps = SelectList::<CrateDependency>::default();
let attrs = krate.build_script_attrs.as_ref();
Ok(CargoBuildScript {
@@ -392,69 +390,96 @@
//
// Do not change this name to "cargo_build_script".
name: format!("{}_build_script", krate.name),
- aliases: self
- .make_aliases(krate, true, false)
- .remap_configurations(platforms),
- build_script_env: attrs
- .map_or_else(SelectDict::default, |attrs| attrs.build_script_env.clone())
- .remap_configurations(platforms),
+ aliases: SelectDict::new(self.make_aliases(krate, true, false), platforms),
+ build_script_env: SelectDict::new(
+ attrs
+ .map(|attrs| attrs.build_script_env.clone())
+ .unwrap_or_default(),
+ platforms,
+ ),
compile_data: make_data(
platforms,
- &empty_set,
- attrs.map_or(&empty_list, |attrs| &attrs.compile_data),
+ Default::default(),
+ attrs
+ .map(|attrs| attrs.compile_data.clone())
+ .unwrap_or_default(),
),
- crate_features: SelectList::from(&krate.common_attrs.crate_features)
- .map_configuration_names(|triple| {
- render_platform_constraint_label(
- &self.config.platforms_template,
- &TargetTriple::from_bazel(triple),
- )
- }),
+ crate_features: SelectSet::new(
+ Select::<BTreeSet<String>>::from(&krate.common_attrs.crate_features),
+ platforms,
+ ),
crate_name: utils::sanitize_module_name(&target.crate_name),
crate_root: target.crate_root.clone(),
data: make_data(
platforms,
- attrs.map_or(&empty_set, |attrs| &attrs.data_glob),
- attrs.map_or(&empty_list, |attrs| &attrs.data),
+ attrs
+ .map(|attrs| attrs.data_glob.clone())
+ .unwrap_or_default(),
+ attrs.map(|attrs| attrs.data.clone()).unwrap_or_default(),
),
- deps: self
- .make_deps(
- attrs.map_or(&empty_deps, |attrs| &attrs.deps),
- attrs.map_or(&empty_list, |attrs| &attrs.extra_deps),
- )
- .remap_configurations(platforms),
- link_deps: self
- .make_deps(
- attrs.map_or(&empty_deps, |attrs| &attrs.link_deps),
- attrs.map_or(&empty_list, |attrs| &attrs.extra_link_deps),
- )
- .remap_configurations(platforms),
+ deps: SelectSet::new(
+ self.make_deps(
+ attrs.map(|attrs| attrs.deps.clone()).unwrap_or_default(),
+ attrs
+ .map(|attrs| attrs.extra_deps.clone())
+ .unwrap_or_default(),
+ ),
+ platforms,
+ ),
+ link_deps: SelectSet::new(
+ self.make_deps(
+ attrs
+ .map(|attrs| attrs.link_deps.clone())
+ .unwrap_or_default(),
+ attrs
+ .map(|attrs| attrs.extra_link_deps.clone())
+ .unwrap_or_default(),
+ ),
+ platforms,
+ ),
edition: krate.common_attrs.edition.clone(),
linker_script: krate.common_attrs.linker_script.clone(),
links: attrs.and_then(|attrs| attrs.links.clone()),
- proc_macro_deps: self
- .make_deps(
- attrs.map_or(&empty_deps, |attrs| &attrs.proc_macro_deps),
- attrs.map_or(&empty_list, |attrs| &attrs.extra_proc_macro_deps),
- )
- .remap_configurations(platforms),
- rundir: attrs.and_then(|attrs| attrs.rundir.clone()),
- rustc_env: attrs
- .map_or_else(SelectDict::default, |attrs| attrs.rustc_env.clone())
- .remap_configurations(platforms),
- rustc_env_files: attrs
- .map_or_else(SelectList::default, |attrs| attrs.rustc_env_files.clone())
- .remap_configurations(platforms),
- rustc_flags: {
- let mut rustc_flags =
- attrs.map_or_else(SelectList::default, |attrs| attrs.rustc_flags.clone());
+ proc_macro_deps: SelectSet::new(
+ self.make_deps(
+ attrs
+ .map(|attrs| attrs.proc_macro_deps.clone())
+ .unwrap_or_default(),
+ attrs
+ .map(|attrs| attrs.extra_proc_macro_deps.clone())
+ .unwrap_or_default(),
+ ),
+ platforms,
+ ),
+ rundir: SelectScalar::new(
+ attrs.map(|attrs| attrs.rundir.clone()).unwrap_or_default(),
+ platforms,
+ ),
+ rustc_env: SelectDict::new(
+ attrs
+ .map(|attrs| attrs.rustc_env.clone())
+ .unwrap_or_default(),
+ platforms,
+ ),
+ rustc_env_files: SelectSet::new(
+ attrs
+ .map(|attrs| attrs.rustc_env_files.clone())
+ .unwrap_or_default(),
+ platforms,
+ ),
+ rustc_flags: SelectList::new(
// In most cases, warnings in 3rd party crates are not
// interesting as they're out of the control of consumers. The
// flag here silences warnings. For more details see:
// https://doc.rust-lang.org/rustc/lints/levels.html
- rustc_flags.insert("--cap-lints=allow".to_owned(), None);
- rustc_flags.remap_configurations(platforms)
- },
+ Select::merge(
+ Select::from_value(Vec::from(["--cap-lints=allow".to_owned()])),
+ attrs
+ .map(|attrs| attrs.rustc_flags.clone())
+ .unwrap_or_default(),
+ ),
+ platforms,
+ ),
srcs: target.srcs.clone(),
tags: {
let mut tags = BTreeSet::from_iter(krate.common_attrs.tags.iter().cloned());
@@ -465,9 +490,10 @@
tags.insert(format!("crate-name={}", krate.name));
tags
},
- tools: attrs
- .map_or_else(SelectList::default, |attrs| attrs.tools.clone())
- .remap_configurations(platforms),
+ tools: SelectSet::new(
+ attrs.map(|attrs| attrs.tools.clone()).unwrap_or_default(),
+ platforms,
+ ),
toolchains: attrs.map_or_else(BTreeSet::new, |attrs| attrs.toolchains.clone()),
version: krate.common_attrs.version.clone(),
visibility: BTreeSet::from(["//visibility:private".to_owned()]),
@@ -482,18 +508,21 @@
) -> Result<RustProcMacro> {
Ok(RustProcMacro {
name: target.crate_name.clone(),
- deps: self
- .make_deps(&krate.common_attrs.deps, &krate.common_attrs.extra_deps)
- .remap_configurations(platforms),
- proc_macro_deps: self
- .make_deps(
- &krate.common_attrs.proc_macro_deps,
- &krate.common_attrs.extra_proc_macro_deps,
- )
- .remap_configurations(platforms),
- aliases: self
- .make_aliases(krate, false, false)
- .remap_configurations(platforms),
+ deps: SelectSet::new(
+ self.make_deps(
+ krate.common_attrs.deps.clone(),
+ krate.common_attrs.extra_deps.clone(),
+ ),
+ platforms,
+ ),
+ proc_macro_deps: SelectSet::new(
+ self.make_deps(
+ krate.common_attrs.proc_macro_deps.clone(),
+ krate.common_attrs.extra_proc_macro_deps.clone(),
+ ),
+ platforms,
+ ),
+ aliases: SelectDict::new(self.make_aliases(krate, false, false), platforms),
common: self.make_common_attrs(platforms, krate, target)?,
})
}
@@ -506,18 +535,21 @@
) -> Result<RustLibrary> {
Ok(RustLibrary {
name: target.crate_name.clone(),
- deps: self
- .make_deps(&krate.common_attrs.deps, &krate.common_attrs.extra_deps)
- .remap_configurations(platforms),
- proc_macro_deps: self
- .make_deps(
- &krate.common_attrs.proc_macro_deps,
- &krate.common_attrs.extra_proc_macro_deps,
- )
- .remap_configurations(platforms),
- aliases: self
- .make_aliases(krate, false, false)
- .remap_configurations(platforms),
+ deps: SelectSet::new(
+ self.make_deps(
+ krate.common_attrs.deps.clone(),
+ krate.common_attrs.extra_deps.clone(),
+ ),
+ platforms,
+ ),
+ proc_macro_deps: SelectSet::new(
+ self.make_deps(
+ krate.common_attrs.proc_macro_deps.clone(),
+ krate.common_attrs.extra_proc_macro_deps.clone(),
+ ),
+ platforms,
+ ),
+ aliases: SelectDict::new(self.make_aliases(krate, false, false), platforms),
common: self.make_common_attrs(platforms, krate, target)?,
disable_pipelining: krate.disable_pipelining,
})
@@ -532,22 +564,23 @@
Ok(RustBinary {
name: format!("{}__bin", target.crate_name),
deps: {
- let mut deps =
- self.make_deps(&krate.common_attrs.deps, &krate.common_attrs.extra_deps);
+ let mut deps = self.make_deps(
+ krate.common_attrs.deps.clone(),
+ krate.common_attrs.extra_deps.clone(),
+ );
if let Some(library_target_name) = &krate.library_target_name {
deps.insert(format!(":{library_target_name}"), None);
}
- deps.remap_configurations(platforms)
+ SelectSet::new(deps, platforms)
},
- proc_macro_deps: self
- .make_deps(
- &krate.common_attrs.proc_macro_deps,
- &krate.common_attrs.extra_proc_macro_deps,
- )
- .remap_configurations(platforms),
- aliases: self
- .make_aliases(krate, false, false)
- .remap_configurations(platforms),
+ proc_macro_deps: SelectSet::new(
+ self.make_deps(
+ krate.common_attrs.proc_macro_deps.clone(),
+ krate.common_attrs.extra_proc_macro_deps.clone(),
+ ),
+ platforms,
+ ),
+ aliases: SelectDict::new(self.make_aliases(krate, false, false), platforms),
common: self.make_common_attrs(platforms, krate, target)?,
})
}
@@ -561,43 +594,34 @@
Ok(CommonAttrs {
compile_data: make_data(
platforms,
- &krate.common_attrs.compile_data_glob,
- &krate.common_attrs.compile_data,
+ krate.common_attrs.compile_data_glob.clone(),
+ krate.common_attrs.compile_data.clone(),
),
- crate_features: SelectList::from(&krate.common_attrs.crate_features)
- .map_configuration_names(|triple| {
- render_platform_constraint_label(
- &self.config.platforms_template,
- &TargetTriple::from_bazel(triple),
- )
- }),
+ crate_features: SelectSet::new(
+ Select::<BTreeSet<String>>::from(&krate.common_attrs.crate_features),
+ platforms,
+ ),
crate_root: target.crate_root.clone(),
data: make_data(
platforms,
- &krate.common_attrs.data_glob,
- &krate.common_attrs.data,
+ krate.common_attrs.data_glob.clone(),
+ krate.common_attrs.data.clone(),
),
edition: krate.common_attrs.edition.clone(),
linker_script: krate.common_attrs.linker_script.clone(),
- rustc_env: krate
- .common_attrs
- .rustc_env
- .clone()
- .remap_configurations(platforms),
- rustc_env_files: krate
- .common_attrs
- .rustc_env_files
- .clone()
- .remap_configurations(platforms),
- rustc_flags: {
- let mut rustc_flags = krate.common_attrs.rustc_flags.clone();
+ rustc_env: SelectDict::new(krate.common_attrs.rustc_env.clone(), platforms),
+ rustc_env_files: SelectSet::new(krate.common_attrs.rustc_env_files.clone(), platforms),
+ rustc_flags: SelectList::new(
// In most cases, warnings in 3rd party crates are not
// interesting as they're out of the control of consumers. The
// flag here silences warnings. For more details see:
// https://doc.rust-lang.org/rustc/lints/levels.html
- rustc_flags.insert(0, "--cap-lints=allow".to_owned());
- rustc_flags
- },
+ Select::merge(
+ Select::from_value(Vec::from(["--cap-lints=allow".to_owned()])),
+ krate.common_attrs.rustc_flags.clone(),
+ ),
+ platforms,
+ ),
srcs: target.srcs.clone(),
tags: {
let mut tags = BTreeSet::from_iter(krate.common_attrs.tags.iter().cloned());
@@ -631,33 +655,33 @@
krate: &CrateContext,
build: bool,
include_dev: bool,
- ) -> SelectDict<String> {
- let mut dep_lists = Vec::new();
+ ) -> Select<BTreeMap<String, String>> {
+ let mut dependency_selects = Vec::new();
if build {
if let Some(build_script_attrs) = &krate.build_script_attrs {
- dep_lists.push(&build_script_attrs.deps);
- dep_lists.push(&build_script_attrs.proc_macro_deps);
+ dependency_selects.push(&build_script_attrs.deps);
+ dependency_selects.push(&build_script_attrs.proc_macro_deps);
}
} else {
- dep_lists.push(&krate.common_attrs.deps);
- dep_lists.push(&krate.common_attrs.proc_macro_deps);
+ dependency_selects.push(&krate.common_attrs.deps);
+ dependency_selects.push(&krate.common_attrs.proc_macro_deps);
if include_dev {
- dep_lists.push(&krate.common_attrs.deps_dev);
- dep_lists.push(&krate.common_attrs.proc_macro_deps_dev);
+ dependency_selects.push(&krate.common_attrs.deps_dev);
+ dependency_selects.push(&krate.common_attrs.proc_macro_deps_dev);
}
}
- let mut aliases = SelectDict::default();
- for (dep, conf) in dep_lists.into_iter().flat_map(|deps| {
- deps.configurations().into_iter().flat_map(move |conf| {
- deps.get_iter(conf)
- .expect("Iterating over known keys should never panic")
- .map(move |dep| (dep, conf))
- })
- }) {
- if let Some(alias) = &dep.alias {
- let label = self.crate_label(&dep.id.name, &dep.id.version, &dep.target);
- aliases.insert(label, alias.clone(), conf.cloned());
+ let mut aliases: Select<BTreeMap<String, String>> = Select::default();
+ for dependency_select in dependency_selects.iter() {
+ for (configuration, dependency) in dependency_select.items().into_iter() {
+ if let Some(alias) = &dependency.alias {
+ let label = self.crate_label(
+ &dependency.id.name,
+ &dependency.id.version,
+ &dependency.target,
+ );
+ aliases.insert((label, alias.clone()), configuration.clone());
+ }
}
}
aliases
@@ -665,14 +689,13 @@
fn make_deps(
&self,
- deps: &SelectList<CrateDependency>,
- extra_deps: &SelectList<String>,
- ) -> SelectList<String> {
- let mut deps = deps
- .clone()
- .map(|dep| self.crate_label(&dep.id.name, &dep.id.version, &dep.target));
- deps.extend(extra_deps.into_iter());
- deps
+ deps: Select<BTreeSet<CrateDependency>>,
+ extra_deps: Select<BTreeSet<String>>,
+ ) -> Select<BTreeSet<String>> {
+ Select::merge(
+ deps.map(|dep| self.crate_label(&dep.id.name, &dep.id.version, &dep.target)),
+ extra_deps,
+ )
}
fn render_vendor_support_files(&self, context: &Context) -> Result<BTreeMap<PathBuf, String>> {
@@ -797,7 +820,11 @@
)
}
-fn make_data(platforms: &Platforms, glob: &BTreeSet<String>, select: &SelectList<String>) -> Data {
+fn make_data(
+ platforms: &Platforms,
+ glob: BTreeSet<String>,
+ select: Select<BTreeSet<String>>,
+) -> Data {
const COMMON_GLOB_EXCLUDES: &[&str] = &[
"**/* *",
"BUILD.bazel",
@@ -809,13 +836,13 @@
Data {
glob: Glob {
- include: glob.clone(),
+ include: glob,
exclude: COMMON_GLOB_EXCLUDES
.iter()
.map(|&glob| glob.to_owned())
.collect(),
},
- select: select.clone().remap_configurations(platforms),
+ select: SelectSet::new(select, platforms),
}
}
@@ -833,7 +860,6 @@
};
use crate::metadata::Annotations;
use crate::test;
- use crate::utils::starlark::SelectList;
fn mock_target_attributes() -> TargetAttributes {
TargetAttributes {
@@ -1161,7 +1187,7 @@
version: crate_id.version,
targets: BTreeSet::from([Rule::Library(mock_target_attributes())]),
common_attrs: CommonAttributes {
- rustc_flags: rustc_flags.clone(),
+ rustc_flags: Select::from_value(rustc_flags.clone()),
..CommonAttributes::default()
},
..CrateContext::default()
@@ -1268,19 +1294,28 @@
let build_file_content = output
.get(&PathBuf::from("BUILD.mock_crate-0.1.0.bazel"))
.unwrap();
- assert!(build_file_content.replace(' ', "").contains(
- &r#"crate_features = [
- "bar",
- "foo",
-],"#
+ let expected = indoc! {r#"
+ crate_features = [
+ "bar",
+ "foo",
+ ],
+ "#};
+ assert!(build_file_content
.replace(' ', "")
- ));
+ .contains(&expected.replace(' ', "")));
}
+
#[test]
fn crate_features_by_target() {
- let mut context = Context::default();
+ let mut context = Context {
+ conditions: mock_supported_platform_triples()
+ .iter()
+ .map(|platform| (platform.to_bazel(), BTreeSet::from([platform.clone()])))
+ .collect(),
+ ..Context::default()
+ };
let crate_id = CrateId::new("mock_crate".to_owned(), "0.1.0".to_owned());
- let mut features = SelectList::default();
+ let mut features: Select<BTreeSet<String>> = Select::default();
features.insert("foo".to_owned(), Some("aarch64-apple-darwin".to_owned()));
features.insert("bar".to_owned(), None);
context.crates.insert(
@@ -1290,7 +1325,7 @@
version: crate_id.version,
targets: BTreeSet::from([Rule::Library(mock_target_attributes())]),
common_attrs: CommonAttributes {
- crate_features: CrateFeatures::SelectList(features),
+ crate_features: CrateFeatures::SelectSet(features),
..CommonAttributes::default()
},
..CrateContext::default()
@@ -1303,16 +1338,19 @@
let build_file_content = output
.get(&PathBuf::from("BUILD.mock_crate-0.1.0.bazel"))
.unwrap();
- assert!(build_file_content.replace(' ', "").contains(
- &r#"crate_features = [
- "bar",
- ] + select({
- "@rules_rust//rust/platform:aarch64-apple-darwin": [
- "foo",
- ],
- "//conditions:default": [],
-}),"#
- .replace(' ', "")
- ));
+ dbg!(build_file_content);
+ let expected = indoc! {r#"
+ crate_features = [
+ "bar",
+ ] + select({
+ "@rules_rust//rust/platform:aarch64-apple-darwin": [
+ "foo", # aarch64-apple-darwin
+ ],
+ "//conditions:default": [],
+ }),
+ "#};
+ assert!(build_file_content
+ .replace(' ', "")
+ .contains(&expected.replace(' ', "")));
}
}
diff --git a/crate_universe/src/rendering/template_engine.rs b/crate_universe/src/rendering/template_engine.rs
index 28fff72..9b7afff 100644
--- a/crate_universe/src/rendering/template_engine.rs
+++ b/crate_universe/src/rendering/template_engine.rs
@@ -12,8 +12,8 @@
render_crate_bazel_label, render_crate_bazel_repository, render_crate_build_file,
render_module_label, Platforms,
};
+use crate::select::Select;
use crate::utils::sanitize_repository_name;
-use crate::utils::starlark::SelectStringList;
pub struct TemplateEngine {
engine: Tera,
@@ -100,7 +100,7 @@
);
let mut context = tera::Context::new();
- context.insert("default_select_list", &SelectStringList::default());
+ context.insert("default_select_list", &Select::<String>::default());
context.insert("repository_name", &render_config.repository_name);
context.insert("vendor_mode", &render_config.vendor_mode);
context.insert("regen_command", &render_config.regen_command);
diff --git a/crate_universe/src/select.rs b/crate_universe/src/select.rs
new file mode 100644
index 0000000..0ec48ac
--- /dev/null
+++ b/crate_universe/src/select.rs
@@ -0,0 +1,478 @@
+use std::collections::{BTreeMap, BTreeSet};
+use std::fmt::Debug;
+
+use serde::{de::DeserializeOwned, Deserialize, Deserializer, Serialize};
+
+#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
+pub struct Select<T>
+where
+ T: Selectable,
+{
+ common: T::CommonType,
+ selects: BTreeMap<String, T::SelectsType>,
+}
+
+pub trait Selectable
+where
+ Self: SelectableValue,
+{
+ type ItemType: SelectableValue;
+ type CommonType: SelectableValue + Default;
+ type SelectsType: SelectableValue;
+
+ fn is_empty(this: &Select<Self>) -> bool;
+ fn insert(this: &mut Select<Self>, value: Self::ItemType, configuration: Option<String>);
+
+ fn items(this: &Select<Self>) -> Vec<(Option<String>, Self::ItemType)>;
+ fn values(this: &Select<Self>) -> Vec<Self::ItemType>;
+
+ fn merge(lhs: Select<Self>, rhs: Select<Self>) -> Select<Self>;
+}
+
+// Replace with `trait_alias` once stabilized.
+// https://github.com/rust-lang/rust/issues/41517
+pub trait SelectableValue
+where
+ Self: Debug + Clone + PartialEq + Eq + Serialize + DeserializeOwned,
+{
+}
+
+impl<T> SelectableValue for T where T: Debug + Clone + PartialEq + Eq + Serialize + DeserializeOwned {}
+
+// Replace with `trait_alias` once stabilized.
+// https://github.com/rust-lang/rust/issues/41517
+pub trait SelectableOrderedValue
+where
+ Self: SelectableValue + PartialOrd + Ord,
+{
+}
+
+impl<T> SelectableOrderedValue for T where T: SelectableValue + PartialOrd + Ord {}
+
+pub trait SelectableScalar
+where
+ Self: SelectableValue,
+{
+}
+
+impl SelectableScalar for String {}
+impl SelectableScalar for bool {}
+impl SelectableScalar for i64 {}
+
+// General
+impl<T> Select<T>
+where
+ T: Selectable,
+{
+ pub fn new() -> Self {
+ Self {
+ common: T::CommonType::default(),
+ selects: BTreeMap::new(),
+ }
+ }
+
+ pub fn from_value(value: T::CommonType) -> Self {
+ Self {
+ common: value,
+ selects: BTreeMap::new(),
+ }
+ }
+
+ pub fn is_empty(&self) -> bool {
+ T::is_empty(self)
+ }
+
+ pub fn configurations(&self) -> BTreeSet<String> {
+ self.selects.keys().cloned().collect()
+ }
+
+ pub fn items(&self) -> Vec<(Option<String>, T::ItemType)> {
+ T::items(self)
+ }
+
+ pub fn values(&self) -> Vec<T::ItemType> {
+ T::values(self)
+ }
+
+ pub fn insert(&mut self, value: T::ItemType, configuration: Option<String>) {
+ T::insert(self, value, configuration);
+ }
+
+ pub fn into_parts(self) -> (T::CommonType, BTreeMap<String, T::SelectsType>) {
+ (self.common, self.selects)
+ }
+
+ pub fn merge(lhs: Self, rhs: Self) -> Self {
+ T::merge(lhs, rhs)
+ }
+}
+
+impl<T> Default for Select<T>
+where
+ T: Selectable,
+{
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
+impl<'de, T> Deserialize<'de> for Select<T>
+where
+ T: Selectable,
+{
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ #[derive(Debug, Deserialize)]
+ #[serde(untagged)]
+ enum Either<T>
+ where
+ T: Selectable,
+ {
+ Select {
+ common: T::CommonType,
+ selects: BTreeMap<String, T::SelectsType>,
+ },
+ Value(T::CommonType),
+ }
+
+ let either = Either::<T>::deserialize(deserializer)?;
+ match either {
+ Either::Select { common, selects } => Ok(Self { common, selects }),
+ Either::Value(common) => Ok(Self {
+ common,
+ selects: BTreeMap::new(),
+ }),
+ }
+ }
+}
+
+// Scalar
+impl<T> Selectable for T
+where
+ T: SelectableScalar,
+{
+ type ItemType = T;
+ type CommonType = Option<Self::ItemType>;
+ type SelectsType = Self::ItemType;
+
+ fn is_empty(this: &Select<Self>) -> bool {
+ this.common.is_none() && this.selects.is_empty()
+ }
+
+ fn items(this: &Select<Self>) -> Vec<(Option<String>, Self::ItemType)> {
+ let mut result = Vec::new();
+ if let Some(value) = this.common.as_ref() {
+ result.push((None, value.clone()));
+ }
+ result.extend(
+ this.selects
+ .iter()
+ .map(|(configuration, value)| (Some(configuration.clone()), value.clone())),
+ );
+ result
+ }
+
+ fn values(this: &Select<Self>) -> Vec<Self::ItemType> {
+ let mut result = Vec::new();
+ if let Some(value) = this.common.as_ref() {
+ result.push(value.clone());
+ }
+ result.extend(this.selects.values().cloned());
+ result
+ }
+
+ fn insert(this: &mut Select<Self>, value: Self::ItemType, configuration: Option<String>) {
+ match configuration {
+ None => {
+ this.selects
+ .retain(|_, existing_value| existing_value != &value);
+ this.common = Some(value);
+ }
+ Some(configuration) => {
+ if Some(&value) != this.common.as_ref() {
+ this.selects.insert(configuration, value);
+ }
+ }
+ }
+ }
+
+ fn merge(lhs: Select<Self>, rhs: Select<Self>) -> Select<Self> {
+ let mut result: Select<Self> = Select::new();
+
+ if let Some(value) = lhs.common {
+ result.insert(value, None);
+ }
+ if let Some(value) = rhs.common {
+ result.insert(value, None);
+ }
+
+ for (configuration, value) in lhs.selects.into_iter() {
+ result.insert(value, Some(configuration));
+ }
+ for (configuration, value) in rhs.selects.into_iter() {
+ result.insert(value, Some(configuration));
+ }
+
+ result
+ }
+}
+
+// Vec<T>
+impl<T> Selectable for Vec<T>
+where
+ T: SelectableValue,
+{
+ type ItemType = T;
+ type CommonType = Vec<T>;
+ type SelectsType = Vec<T>;
+
+ fn is_empty(this: &Select<Self>) -> bool {
+ this.common.is_empty() && this.selects.is_empty()
+ }
+
+ fn items(this: &Select<Self>) -> Vec<(Option<String>, Self::ItemType)> {
+ let mut result = Vec::new();
+ result.extend(this.common.iter().map(|value| (None, value.clone())));
+ result.extend(this.selects.iter().flat_map(|(configuration, values)| {
+ values
+ .iter()
+ .map(|value| (Some(configuration.clone()), value.clone()))
+ }));
+ result
+ }
+
+ fn values(this: &Select<Self>) -> Vec<Self::ItemType> {
+ let mut result = Vec::new();
+ result.extend(this.common.iter().cloned());
+ result.extend(
+ this.selects
+ .values()
+ .flat_map(|values| values.iter().cloned()),
+ );
+ result
+ }
+
+ fn insert(this: &mut Select<Self>, value: Self::ItemType, configuration: Option<String>) {
+ match configuration {
+ None => this.common.push(value),
+ Some(configuration) => this.selects.entry(configuration).or_default().push(value),
+ }
+ }
+
+ fn merge(lhs: Select<Self>, rhs: Select<Self>) -> Select<Self> {
+ let mut result: Select<Self> = Select::new();
+
+ for value in lhs.common.into_iter() {
+ result.insert(value, None);
+ }
+ for value in rhs.common.into_iter() {
+ result.insert(value, None);
+ }
+
+ for (configuration, values) in lhs.selects.into_iter() {
+ for value in values.into_iter() {
+ result.insert(value, Some(configuration.clone()));
+ }
+ }
+ for (configuration, values) in rhs.selects.into_iter() {
+ for value in values.into_iter() {
+ result.insert(value, Some(configuration.clone()));
+ }
+ }
+
+ result
+ }
+}
+
+// BTreeSet<T>
+impl<T> Selectable for BTreeSet<T>
+where
+ T: SelectableOrderedValue,
+{
+ type ItemType = T;
+ type CommonType = BTreeSet<T>;
+ type SelectsType = BTreeSet<T>;
+
+ fn is_empty(this: &Select<Self>) -> bool {
+ this.common.is_empty() && this.selects.is_empty()
+ }
+
+ fn items(this: &Select<Self>) -> Vec<(Option<String>, Self::ItemType)> {
+ let mut result = Vec::new();
+ result.extend(this.common.iter().map(|value| (None, value.clone())));
+ result.extend(this.selects.iter().flat_map(|(configuration, values)| {
+ values
+ .iter()
+ .map(|value| (Some(configuration.clone()), value.clone()))
+ }));
+ result
+ }
+
+ fn values(this: &Select<Self>) -> Vec<Self::ItemType> {
+ let mut result = Vec::new();
+ result.extend(this.common.iter().cloned());
+ result.extend(
+ this.selects
+ .values()
+ .flat_map(|values| values.iter().cloned()),
+ );
+ result
+ }
+
+ fn insert(this: &mut Select<Self>, value: Self::ItemType, configuration: Option<String>) {
+ match configuration {
+ None => {
+ this.selects.retain(|_, set| {
+ set.remove(&value);
+ !set.is_empty()
+ });
+ this.common.insert(value);
+ }
+ Some(configuration) => {
+ if !this.common.contains(&value) {
+ this.selects.entry(configuration).or_default().insert(value);
+ }
+ }
+ }
+ }
+
+ fn merge(lhs: Select<Self>, rhs: Select<Self>) -> Select<Self> {
+ let mut result: Select<Self> = Select::new();
+
+ for value in lhs.common.into_iter() {
+ result.insert(value, None);
+ }
+ for value in rhs.common.into_iter() {
+ result.insert(value, None);
+ }
+
+ for (configuration, values) in lhs.selects.into_iter() {
+ for value in values {
+ result.insert(value, Some(configuration.clone()));
+ }
+ }
+ for (configuration, values) in rhs.selects.into_iter() {
+ for value in values {
+ result.insert(value, Some(configuration.clone()));
+ }
+ }
+
+ result
+ }
+}
+
+impl<T> Select<BTreeSet<T>>
+where
+ T: SelectableOrderedValue,
+{
+ pub fn map<U, F>(self, func: F) -> Select<BTreeSet<U>>
+ where
+ U: SelectableOrderedValue,
+ F: Copy + FnMut(T) -> U,
+ {
+ Select {
+ common: self.common.into_iter().map(func).collect(),
+ selects: self
+ .selects
+ .into_iter()
+ .map(|(configuration, values)| {
+ (configuration, values.into_iter().map(func).collect())
+ })
+ .collect(),
+ }
+ }
+}
+
+// BTreeMap<String, T>
+impl<T> Selectable for BTreeMap<String, T>
+where
+ T: SelectableValue,
+{
+ type ItemType = (String, T);
+ type CommonType = BTreeMap<String, T>;
+ type SelectsType = BTreeMap<String, T>;
+
+ fn is_empty(this: &Select<Self>) -> bool {
+ this.common.is_empty() && this.selects.is_empty()
+ }
+
+ fn items(this: &Select<Self>) -> Vec<(Option<String>, Self::ItemType)> {
+ let mut result = Vec::new();
+ result.extend(
+ this.common
+ .iter()
+ .map(|(key, value)| (None, (key.clone(), value.clone()))),
+ );
+ result.extend(this.selects.iter().flat_map(|(configuration, values)| {
+ values
+ .iter()
+ .map(|(key, value)| (Some(configuration.clone()), (key.clone(), value.clone())))
+ }));
+ result
+ }
+
+ fn values(this: &Select<Self>) -> Vec<Self::ItemType> {
+ let mut result = Vec::new();
+ result.extend(
+ this.common
+ .iter()
+ .map(|(key, value)| (key.clone(), value.clone())),
+ );
+ result.extend(this.selects.values().flat_map(|values| {
+ values
+ .iter()
+ .map(|(key, value)| (key.clone(), value.clone()))
+ }));
+ result
+ }
+
+ fn insert(
+ this: &mut Select<Self>,
+ (key, value): Self::ItemType,
+ configuration: Option<String>,
+ ) {
+ match configuration {
+ None => {
+ this.selects.retain(|_, map| {
+ map.remove(&key);
+ !map.is_empty()
+ });
+ this.common.insert(key, value);
+ }
+ Some(configuration) => {
+ if !this.common.contains_key(&key) {
+ this.selects
+ .entry(configuration)
+ .or_default()
+ .insert(key, value);
+ }
+ }
+ }
+ }
+
+ fn merge(lhs: Select<Self>, rhs: Select<Self>) -> Select<Self> {
+ let mut result: Select<Self> = Select::new();
+
+ for (key, value) in lhs.common.into_iter() {
+ result.insert((key, value), None);
+ }
+ for (key, value) in rhs.common.into_iter() {
+ result.insert((key, value), None);
+ }
+
+ for (configuration, entries) in lhs.selects.into_iter() {
+ for (key, value) in entries {
+ result.insert((key, value), Some(configuration.clone()));
+ }
+ }
+ for (configuration, entries) in rhs.selects.into_iter() {
+ for (key, value) in entries {
+ result.insert((key, value), Some(configuration.clone()));
+ }
+ }
+
+ result
+ }
+}
diff --git a/crate_universe/src/splicing.rs b/crate_universe/src/splicing.rs
index 4931e11..cd5f085 100644
--- a/crate_universe/src/splicing.rs
+++ b/crate_universe/src/splicing.rs
@@ -17,8 +17,9 @@
use crate::config::CrateId;
use crate::metadata::{Cargo, CargoUpdateRequest, LockGenerator};
+use crate::select::Select;
use crate::utils;
-use crate::utils::starlark::{Label, SelectList};
+use crate::utils::starlark::Label;
use self::cargo_config::CargoConfig;
use self::crate_index_lookup::CrateIndexLookup;
@@ -174,7 +175,7 @@
///
/// We store this here because it's computed during the splicing phase via
/// calls to "cargo tree" which need the full spliced workspace.
- pub features: BTreeMap<CrateId, SelectList<String>>,
+ pub features: BTreeMap<CrateId, Select<BTreeSet<String>>>,
}
impl TryFrom<toml::Value> for WorkspaceMetadata {
@@ -254,7 +255,7 @@
pub fn write_registry_urls_and_feature_map(
cargo: &Cargo,
lockfile: &cargo_lock::Lockfile,
- features: BTreeMap<CrateId, SelectList<String>>,
+ features: BTreeMap<CrateId, Select<BTreeSet<String>>>,
input_manifest_path: &Path,
output_manifest_path: &Path,
) -> Result<()> {
diff --git a/crate_universe/src/utils/starlark.rs b/crate_universe/src/utils/starlark.rs
index 69e6604..f1cf222 100644
--- a/crate_universe/src/utils/starlark.rs
+++ b/crate_universe/src/utils/starlark.rs
@@ -3,6 +3,10 @@
mod glob;
mod label;
mod select;
+mod select_dict;
+mod select_list;
+mod select_scalar;
+mod select_set;
mod serialize;
mod target_compatible_with;
@@ -14,11 +18,12 @@
pub use glob::*;
pub use label::*;
pub use select::*;
+pub use select_dict::*;
+pub use select_list::*;
+pub use select_scalar::*;
+pub use select_set::*;
pub use target_compatible_with::*;
-pub type SelectStringList = SelectList<String>;
-pub type SelectStringDict = SelectDict<String>;
-
#[derive(Serialize)]
#[serde(untagged)]
pub enum Starlark {
@@ -71,73 +76,43 @@
#[serde(rename = "cargo_build_script")]
pub struct CargoBuildScript {
pub name: String,
- #[serde(
- skip_serializing_if = "SelectDict::is_empty",
- serialize_with = "SelectDict::serialize_starlark"
- )]
- pub aliases: SelectDict<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectDict::is_empty",
- serialize_with = "SelectDict::serialize_starlark"
- )]
- pub build_script_env: SelectDict<WithOriginalConfigurations<String>>,
+ #[serde(skip_serializing_if = "SelectDict::is_empty")]
+ pub aliases: SelectDict<String>,
+ #[serde(skip_serializing_if = "SelectDict::is_empty")]
+ pub build_script_env: SelectDict<String>,
#[serde(skip_serializing_if = "Data::is_empty")]
pub compile_data: Data,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub crate_features: SelectList<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub crate_features: SelectSet<String>,
pub crate_name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub crate_root: Option<String>,
#[serde(skip_serializing_if = "Data::is_empty")]
pub data: Data,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub link_deps: SelectList<WithOriginalConfigurations<String>>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub link_deps: SelectSet<String>,
pub edition: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub linker_script: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub links: Option<String>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub proc_macro_deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub rundir: Option<String>,
- #[serde(
- skip_serializing_if = "SelectDict::is_empty",
- serialize_with = "SelectDict::serialize_starlark"
- )]
- pub rustc_env: SelectDict<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub rustc_env_files: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub rustc_flags: SelectList<WithOriginalConfigurations<String>>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub proc_macro_deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectScalar::is_empty")]
+ pub rundir: SelectScalar<String>,
+ #[serde(skip_serializing_if = "SelectDict::is_empty")]
+ pub rustc_env: SelectDict<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub rustc_env_files: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectList::is_empty")]
+ pub rustc_flags: SelectList<String>,
pub srcs: Glob,
#[serde(skip_serializing_if = "Set::is_empty")]
pub tags: Set<String>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub tools: SelectList<WithOriginalConfigurations<String>>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub tools: SelectSet<String>,
#[serde(skip_serializing_if = "Set::is_empty")]
pub toolchains: Set<String>,
pub version: String,
@@ -147,21 +122,12 @@
#[derive(Serialize)]
pub struct RustProcMacro {
pub name: String,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub proc_macro_deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectDict::is_empty",
- serialize_with = "SelectDict::serialize_starlark"
- )]
- pub aliases: SelectDict<WithOriginalConfigurations<String>>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub proc_macro_deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectDict::is_empty")]
+ pub aliases: SelectDict<String>,
#[serde(flatten)]
pub common: CommonAttrs,
}
@@ -169,21 +135,12 @@
#[derive(Serialize)]
pub struct RustLibrary {
pub name: String,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub proc_macro_deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectDict::is_empty",
- serialize_with = "SelectDict::serialize_starlark"
- )]
- pub aliases: SelectDict<WithOriginalConfigurations<String>>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub proc_macro_deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectDict::is_empty")]
+ pub aliases: SelectDict<String>,
#[serde(flatten)]
pub common: CommonAttrs,
#[serde(skip_serializing_if = "std::ops::Not::not")]
@@ -193,21 +150,12 @@
#[derive(Serialize)]
pub struct RustBinary {
pub name: String,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub proc_macro_deps: SelectList<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectDict::is_empty",
- serialize_with = "SelectDict::serialize_starlark"
- )]
- pub aliases: SelectDict<WithOriginalConfigurations<String>>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub proc_macro_deps: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectDict::is_empty")]
+ pub aliases: SelectDict<String>,
#[serde(flatten)]
pub common: CommonAttrs,
}
@@ -216,11 +164,8 @@
pub struct CommonAttrs {
#[serde(skip_serializing_if = "Data::is_empty")]
pub compile_data: Data,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub crate_features: SelectList<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub crate_features: SelectSet<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub crate_root: Option<String>,
#[serde(skip_serializing_if = "Data::is_empty")]
@@ -228,18 +173,12 @@
pub edition: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub linker_script: Option<String>,
- #[serde(
- skip_serializing_if = "SelectDict::is_empty",
- serialize_with = "SelectDict::serialize_starlark"
- )]
- pub rustc_env: SelectDict<WithOriginalConfigurations<String>>,
- #[serde(
- skip_serializing_if = "SelectList::is_empty",
- serialize_with = "SelectList::serialize_starlark"
- )]
- pub rustc_env_files: SelectList<WithOriginalConfigurations<String>>,
- #[serde(skip_serializing_if = "Vec::is_empty")]
- pub rustc_flags: Vec<String>,
+ #[serde(skip_serializing_if = "SelectDict::is_empty")]
+ pub rustc_env: SelectDict<String>,
+ #[serde(skip_serializing_if = "SelectSet::is_empty")]
+ pub rustc_env_files: SelectSet<String>,
+ #[serde(skip_serializing_if = "SelectList::is_empty")]
+ pub rustc_flags: SelectList<String>,
pub srcs: Glob,
#[serde(skip_serializing_if = "Set::is_empty")]
pub tags: Set<String>,
@@ -250,7 +189,7 @@
pub struct Data {
pub glob: Glob,
- pub select: SelectList<WithOriginalConfigurations<String>>,
+ pub select: SelectSet<String>,
}
impl Package {
diff --git a/crate_universe/src/utils/starlark/select.rs b/crate_universe/src/utils/starlark/select.rs
index eb3789b..43c5758 100644
--- a/crate_universe/src/utils/starlark/select.rs
+++ b/crate_universe/src/utils/starlark/select.rs
@@ -1,315 +1,19 @@
-use std::collections::{btree_set, BTreeMap, BTreeSet};
-use std::iter::{once, FromIterator};
+use std::collections::BTreeSet;
+use std::iter::FromIterator;
-use crate::config::StringOrSelect;
-use serde::ser::{SerializeMap, SerializeTupleStruct, Serializer};
-use serde::{Deserialize, Serialize};
-use serde_starlark::{FunctionCall, LineComment, MULTILINE};
-
-use crate::utils::starlark::serialize::MultilineArray;
-
-pub trait SelectMap<T, U> {
- // A selectable should also implement a `map` function allowing one type of selectable
- // to be mutated into another. However, the approach I'm looking for requires GAT
- // (Generic Associated Types) which are not yet stable.
- // https://github.com/rust-lang/rust/issues/44265
- type Mapped;
- fn map<F: Copy + Fn(T) -> U>(self, func: F) -> Self::Mapped;
-}
-
-pub trait Select<T> {
- /// Gather a list of all conditions currently set on the selectable. A conditional
- /// would be the key of the select statement.
- fn configurations(&self) -> BTreeSet<Option<&String>>;
-}
-
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize, Clone)]
-pub struct SelectList<T: Ord> {
- // Invariant: any T in `common` is not anywhere in `selects`.
- common: BTreeSet<T>,
- // Invariant: none of the sets are empty.
- selects: BTreeMap<String, BTreeSet<T>>,
- // Elements that used to be in `selects` before the most recent
- // `remap_configurations` operation, but whose old configuration did not get
- // mapped to any new configuration. They could be ignored, but are preserved
- // here to generate comments that help the user understand what happened.
- #[serde(skip_serializing_if = "BTreeSet::is_empty", default = "BTreeSet::new")]
- unmapped: BTreeSet<T>,
-}
-
-impl<T: Ord> Default for SelectList<T> {
- fn default() -> Self {
- Self {
- common: BTreeSet::new(),
- selects: BTreeMap::new(),
- unmapped: BTreeSet::new(),
- }
- }
-}
-
-impl<T: Ord> SelectList<T> {
- // TODO: This should probably be added to the [Select] trait
- pub fn insert(&mut self, value: T, configuration: Option<String>) {
- match configuration {
- None => {
- self.selects.retain(|_, set| {
- set.remove(&value);
- !set.is_empty()
- });
- self.common.insert(value);
- }
- Some(cfg) => {
- if !self.common.contains(&value) {
- self.selects.entry(cfg).or_default().insert(value);
- }
- }
- }
- }
-
- // TODO: This should probably be added to the [Select] trait
- pub fn get_iter(&self, config: Option<&String>) -> Option<btree_set::Iter<T>> {
- match config {
- Some(conf) => self.selects.get(conf).map(|set| set.iter()),
- None => Some(self.common.iter()),
- }
- }
-
- /// Iterates through all potential values of the select.
- pub fn iter_all_branches(&self) -> impl Iterator<Item = &T> {
- self.common
- .iter()
- .chain(self.selects.values().flat_map(|value| value.iter()))
- }
-
- /// Determine whether or not the select should be serialized
- pub fn is_empty(&self) -> bool {
- self.common.is_empty() && self.selects.is_empty() && self.unmapped.is_empty()
- }
-
- /// Maps configuration names by `f`. This function must be injective
- /// (that is `a != b --> f(a) != f(b)`).
- pub fn map_configuration_names<F>(self, mut f: F) -> Self
- where
- F: FnMut(String) -> String,
- {
- Self {
- common: self.common,
- selects: self.selects.into_iter().map(|(k, v)| (f(k), v)).collect(),
- unmapped: self.unmapped,
- }
- }
-}
-
-impl SelectList<String> {
- pub fn extend<Iter: Iterator<Item = StringOrSelect>>(&mut self, values: Iter) {
- for value in values {
- match value {
- StringOrSelect::Value(value) => {
- self.insert(value, None);
- }
- StringOrSelect::Select(select) => {
- for (select_key, value) in select {
- self.insert(value.clone(), Some(select_key.clone()));
- }
- }
- }
- }
- }
-}
-
-impl IntoIterator for &SelectList<String> {
- type Item = StringOrSelect;
- type IntoIter = <Vec<StringOrSelect> as IntoIterator>::IntoIter;
- fn into_iter(self) -> Self::IntoIter {
- let mut all_values = Vec::with_capacity(self.common.len() + self.selects.len());
- for value in &self.common {
- all_values.push(StringOrSelect::Value(value.clone()))
- }
- for (key, values) in &self.selects {
- for value in values {
- let mut map = BTreeMap::new();
- map.insert(key.clone(), value.clone());
- all_values.push(StringOrSelect::Select(map))
- }
- }
- all_values.into_iter()
- }
-}
+use serde::ser::Serializer;
+use serde::Serialize;
+use serde_starlark::LineComment;
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
pub struct WithOriginalConfigurations<T> {
- value: T,
- original_configurations: Option<BTreeSet<String>>,
-}
-
-impl<T: Ord + Clone> SelectList<T> {
- /// Generates a new SelectList re-keyed by the given configuration mapping.
- /// This mapping maps from configurations in the current SelectList to sets of
- /// configurations in the new SelectList.
- pub fn remap_configurations(
- self,
- mapping: &BTreeMap<String, BTreeSet<String>>,
- ) -> SelectList<WithOriginalConfigurations<T>> {
- // Map new configuration -> value -> old configurations.
- let mut remapped: BTreeMap<String, BTreeMap<T, BTreeSet<String>>> = BTreeMap::new();
- // Map value -> old configurations.
- let mut unmapped: BTreeMap<T, BTreeSet<String>> = BTreeMap::new();
-
- for (original_configuration, values) in self.selects {
- match mapping.get(&original_configuration) {
- Some(configurations) => {
- for configuration in configurations {
- for value in &values {
- remapped
- .entry(configuration.clone())
- .or_default()
- .entry(value.clone())
- .or_default()
- .insert(original_configuration.clone());
- }
- }
- }
- None => {
- let destination =
- if looks_like_bazel_configuration_label(&original_configuration) {
- remapped.entry(original_configuration.clone()).or_default()
- } else {
- &mut unmapped
- };
- for value in values {
- destination
- .entry(value)
- .or_default()
- .insert(original_configuration.clone());
- }
- }
- }
- }
-
- SelectList {
- common: self
- .common
- .into_iter()
- .map(|value| WithOriginalConfigurations {
- value,
- original_configurations: None,
- })
- .collect(),
- selects: remapped
- .into_iter()
- .map(|(new_configuration, value_to_original_configuration)| {
- (
- new_configuration,
- value_to_original_configuration
- .into_iter()
- .map(
- |(value, original_configurations)| WithOriginalConfigurations {
- value,
- original_configurations: Some(original_configurations),
- },
- )
- .collect(),
- )
- })
- .collect(),
- unmapped: unmapped
- .into_iter()
- .map(
- |(value, original_configurations)| WithOriginalConfigurations {
- value,
- original_configurations: Some(original_configurations),
- },
- )
- .collect(),
- }
- }
+ pub value: T,
+ pub original_configurations: BTreeSet<String>,
}
#[derive(Serialize)]
#[serde(rename = "selects.NO_MATCHING_PLATFORM_TRIPLES")]
-struct NoMatchingPlatformTriples;
-
-// TODO: after removing the remaining tera template usages of SelectList, this
-// inherent method should become the Serialize impl.
-impl<T: Ord> SelectList<T> {
- pub fn serialize_starlark<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- T: Serialize,
- S: Serializer,
- {
- // Output looks like:
- //
- // [
- // "common...",
- // ] + select({
- // "configuration": [
- // "value...", # cfg(whatever)
- // ],
- // "//conditions:default": [],
- // })
- //
- // The common part and select are each omitted if they are empty (except
- // if the entire thing is empty, in which case we serialize the common
- // part to get an empty array).
- //
- // If there are unmapped entries, we include them like this:
- //
- // [
- // "common...",
- // ] + selects.with_unmapped({
- // "configuration": [
- // "value...", # cfg(whatever)
- // ],
- // "//conditions:default": [],
- // selects.NO_MATCHING_PLATFORM_TRIPLES: [
- // "value...", # cfg(obscure)
- // ],
- // })
-
- let mut plus = serializer.serialize_tuple_struct("+", MULTILINE)?;
-
- if !self.common.is_empty() || self.selects.is_empty() && self.unmapped.is_empty() {
- plus.serialize_field(&MultilineArray(&self.common))?;
- }
-
- if !self.selects.is_empty() || !self.unmapped.is_empty() {
- struct SelectInner<'a, T: Ord>(&'a SelectList<T>);
-
- impl<'a, T> Serialize for SelectInner<'a, T>
- where
- T: Ord + Serialize,
- {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: Serializer,
- {
- let mut map = serializer.serialize_map(Some(MULTILINE))?;
- for (cfg, value) in &self.0.selects {
- map.serialize_entry(cfg, &MultilineArray(value))?;
- }
- map.serialize_entry("//conditions:default", &[] as &[T])?;
- if !self.0.unmapped.is_empty() {
- map.serialize_entry(
- &NoMatchingPlatformTriples,
- &MultilineArray(&self.0.unmapped),
- )?;
- }
- map.end()
- }
- }
-
- let function = if self.unmapped.is_empty() {
- "select"
- } else {
- "selects.with_unmapped"
- };
-
- plus.serialize_field(&FunctionCall::new(function, [SelectInner(self)]))?;
- }
-
- plus.end()
- }
-}
+pub struct NoMatchingPlatformTriples;
impl<T> Serialize for WithOriginalConfigurations<T>
where
@@ -319,304 +23,9 @@
where
S: Serializer,
{
- if let Some(original_configurations) = &self.original_configurations {
- let comment =
- Vec::from_iter(original_configurations.iter().map(String::as_str)).join(", ");
- LineComment::new(&self.value, &comment).serialize(serializer)
- } else {
- self.value.serialize(serializer)
- }
- }
-}
-
-impl<T: Ord> Select<T> for SelectList<T> {
- fn configurations(&self) -> BTreeSet<Option<&String>> {
- let configs = self.selects.keys().map(Some);
- match self.common.is_empty() {
- true => configs.collect(),
- false => configs.chain(once(None)).collect(),
- }
- }
-}
-
-impl<T: Ord, U: Ord> SelectMap<T, U> for SelectList<T> {
- type Mapped = SelectList<U>;
-
- fn map<F: Copy + Fn(T) -> U>(self, func: F) -> Self::Mapped {
- let common: BTreeSet<U> = self.common.into_iter().map(func).collect();
- let selects: BTreeMap<String, BTreeSet<U>> = self
- .selects
- .into_iter()
- .filter_map(|(key, set)| {
- let set: BTreeSet<U> = set
- .into_iter()
- .map(func)
- .filter(|value| !common.contains(value))
- .collect();
- if set.is_empty() {
- None
- } else {
- Some((key, set))
- }
- })
- .collect();
- SelectList {
- common,
- selects,
- unmapped: self.unmapped.into_iter().map(func).collect(),
- }
- }
-}
-
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize, Clone)]
-pub struct SelectDict<T: Ord> {
- // Invariant: keys in this map are not in any of the inner maps of `selects`.
- common: BTreeMap<String, T>,
- // Invariant: none of the inner maps are empty.
- selects: BTreeMap<String, BTreeMap<String, T>>,
- // Elements that used to be in `selects` before the most recent
- // `remap_configurations` operation, but whose old configuration did not get
- // mapped to any new configuration. They could be ignored, but are preserved
- // here to generate comments that help the user understand what happened.
- #[serde(skip_serializing_if = "BTreeMap::is_empty", default = "BTreeMap::new")]
- unmapped: BTreeMap<String, T>,
-}
-
-impl<T: Ord> Default for SelectDict<T> {
- fn default() -> Self {
- Self {
- common: BTreeMap::new(),
- selects: BTreeMap::new(),
- unmapped: BTreeMap::new(),
- }
- }
-}
-
-impl<T: Ord> SelectDict<T> {
- pub fn insert(&mut self, key: String, value: T, configuration: Option<String>) {
- match configuration {
- None => {
- self.selects.retain(|_, map| {
- map.remove(&key);
- !map.is_empty()
- });
- self.common.insert(key, value);
- }
- Some(cfg) => {
- if !self.common.contains_key(&key) {
- self.selects.entry(cfg).or_default().insert(key, value);
- }
- }
- }
- }
-
- pub fn extend(&mut self, entries: BTreeMap<String, T>, configuration: Option<String>) {
- for (key, value) in entries {
- self.insert(key, value, configuration.clone());
- }
- }
-
- pub fn is_empty(&self) -> bool {
- self.common.is_empty() && self.selects.is_empty() && self.unmapped.is_empty()
- }
-}
-
-impl SelectDict<String> {
- pub fn extend_from_string_or_select<Iter: Iterator<Item = (String, StringOrSelect)>>(
- &mut self,
- values: Iter,
- ) {
- for (key, value) in values {
- match value {
- StringOrSelect::Value(value) => {
- self.insert(key, value, None);
- }
- StringOrSelect::Select(select) => {
- for (select_key, value) in select {
- self.insert(key.clone(), value, Some(select_key));
- }
- }
- }
- }
- }
-}
-
-impl<T: Ord + Clone> SelectDict<T> {
- /// Generates a new SelectDict re-keyed by the given configuration mapping.
- /// This mapping maps from configurations in the current SelectDict to sets
- /// of configurations in the new SelectDict.
- pub fn remap_configurations(
- self,
- mapping: &BTreeMap<String, BTreeSet<String>>,
- ) -> SelectDict<WithOriginalConfigurations<T>> {
- // Map new configuration -> entry -> old configurations.
- let mut remapped: BTreeMap<String, BTreeMap<(String, T), BTreeSet<String>>> =
- BTreeMap::new();
- // Map entry -> old configurations.
- let mut unmapped: BTreeMap<(String, T), BTreeSet<String>> = BTreeMap::new();
-
- for (original_configuration, entries) in self.selects {
- match mapping.get(&original_configuration) {
- Some(configurations) => {
- for configuration in configurations {
- for (key, value) in &entries {
- remapped
- .entry(configuration.clone())
- .or_default()
- .entry((key.clone(), value.clone()))
- .or_default()
- .insert(original_configuration.clone());
- }
- }
- }
- None => {
- for (key, value) in entries {
- let destination =
- if looks_like_bazel_configuration_label(&original_configuration) {
- remapped.entry(original_configuration.clone()).or_default()
- } else {
- &mut unmapped
- };
- destination
- .entry((key, value))
- .or_default()
- .insert(original_configuration.clone());
- }
- }
- }
- }
-
- SelectDict {
- common: self
- .common
- .into_iter()
- .map(|(key, value)| {
- (
- key,
- WithOriginalConfigurations {
- value,
- original_configurations: None,
- },
- )
- })
- .collect(),
- selects: remapped
- .into_iter()
- .map(|(new_configuration, entry_to_original_configuration)| {
- (
- new_configuration,
- entry_to_original_configuration
- .into_iter()
- .map(|((key, value), original_configurations)| {
- (
- key,
- WithOriginalConfigurations {
- value,
- original_configurations: Some(original_configurations),
- },
- )
- })
- .collect(),
- )
- })
- .collect(),
- unmapped: unmapped
- .into_iter()
- .map(|((key, value), original_configurations)| {
- (
- key,
- WithOriginalConfigurations {
- value,
- original_configurations: Some(original_configurations),
- },
- )
- })
- .collect(),
- }
- }
-}
-
-// TODO: after removing the remaining tera template usages of SelectDict, this
-// inherent method should become the Serialize impl.
-impl<T: Ord + Serialize> SelectDict<T> {
- pub fn serialize_starlark<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: Serializer,
- {
- // If there are no platform-specific entries, we output just an ordinary
- // dict.
- //
- // If there are platform-specific ones, we use the following. Ideally it
- // could be done as `dicts.add({...}, select({...}))` but bazel_skylib's
- // dicts.add does not support selects.
- //
- // select({
- // "configuration": {
- // "common-key": "common-value",
- // "plat-key": "plat-value", # cfg(whatever)
- // },
- // "//conditions:default": {},
- // })
- //
- // If there are unmapped entries, we include them like this:
- //
- // selects.with_unmapped({
- // "configuration": {
- // "common-key": "common-value",
- // "plat-key": "plat-value", # cfg(whatever)
- // },
- // "//conditions:default": [],
- // selects.NO_MATCHING_PLATFORM_TRIPLES: {
- // "unmapped-key": "unmapped-value", # cfg(obscure)
- // },
- // })
-
- if self.selects.is_empty() && self.unmapped.is_empty() {
- return self.common.serialize(serializer);
- }
-
- struct SelectInner<'a, T: Ord>(&'a SelectDict<T>);
-
- impl<'a, T> Serialize for SelectInner<'a, T>
- where
- T: Ord + Serialize,
- {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: Serializer,
- {
- let mut map = serializer.serialize_map(Some(MULTILINE))?;
- for (cfg, value) in &self.0.selects {
- let mut combined = BTreeMap::new();
- combined.extend(&self.0.common);
- combined.extend(value);
- map.serialize_entry(cfg, &combined)?;
- }
- map.serialize_entry("//conditions:default", &self.0.common)?;
- if !self.0.unmapped.is_empty() {
- map.serialize_entry(&NoMatchingPlatformTriples, &self.0.unmapped)?;
- }
- map.end()
- }
- }
-
- let function = if self.unmapped.is_empty() {
- "select"
- } else {
- "selects.with_unmapped"
- };
-
- FunctionCall::new(function, [SelectInner(self)]).serialize(serializer)
- }
-}
-
-impl<T: Ord> Select<T> for SelectDict<T> {
- fn configurations(&self) -> BTreeSet<Option<&String>> {
- let configs = self.selects.keys().map(Some);
- match self.common.is_empty() {
- true => configs.collect(),
- false => configs.chain(once(None)).collect(),
- }
+ let comment =
+ Vec::from_iter(self.original_configurations.iter().map(String::as_str)).join(", ");
+ LineComment::new(&self.value, &comment).serialize(serializer)
}
}
@@ -627,524 +36,6 @@
// We don't expect any cfg-expressions or target triples to contain //,
// and all labels _can_ be written in a way that they contain //,
// so we use the presence of // as an indication something is a label.
-fn looks_like_bazel_configuration_label(configuration: &str) -> bool {
+pub fn looks_like_bazel_configuration_label(configuration: &str) -> bool {
configuration.contains("//")
}
-
-#[cfg(test)]
-mod test {
- use super::*;
-
- use indoc::indoc;
-
- #[test]
- fn empty_select_list() {
- let select_list: SelectList<String> = SelectList::default();
-
- let expected_starlark = indoc! {r#"
- []
- "#};
-
- assert_eq!(
- select_list
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn no_platform_specific_select_list() {
- let mut select_list = SelectList::default();
- select_list.insert("Hello".to_owned(), None);
-
- let expected_starlark = indoc! {r#"
- [
- "Hello",
- ]
- "#};
-
- assert_eq!(
- select_list
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn only_platform_specific_select_list() {
- let mut select_list = SelectList::default();
- select_list.insert("Hello".to_owned(), Some("platform".to_owned()));
-
- let expected_starlark = indoc! {r#"
- select({
- "platform": [
- "Hello",
- ],
- "//conditions:default": [],
- })
- "#};
-
- assert_eq!(
- select_list
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn mixed_select_list() {
- let mut select_list = SelectList::default();
- select_list.insert("Hello".to_owned(), Some("platform".to_owned()));
- select_list.insert("Goodbye".to_owned(), None);
-
- let expected_starlark = indoc! {r#"
- [
- "Goodbye",
- ] + select({
- "platform": [
- "Hello",
- ],
- "//conditions:default": [],
- })
- "#};
-
- assert_eq!(
- select_list
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn empty_select_dict() {
- let select_dict: SelectDict<String> = SelectDict::default();
-
- let expected_starlark = indoc! {r#"
- {}
- "#};
-
- assert_eq!(
- select_dict
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn no_platform_specific_select_dict() {
- let mut select_dict = SelectDict::default();
- select_dict.insert("Greeting".to_owned(), "Hello".to_owned(), None);
-
- let expected_starlark = indoc! {r#"
- {
- "Greeting": "Hello",
- }
- "#};
-
- assert_eq!(
- select_dict
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn only_platform_specific_select_dict() {
- let mut select_dict = SelectDict::default();
- select_dict.insert(
- "Greeting".to_owned(),
- "Hello".to_owned(),
- Some("platform".to_owned()),
- );
-
- let expected_starlark = indoc! {r#"
- select({
- "platform": {
- "Greeting": "Hello",
- },
- "//conditions:default": {},
- })
- "#};
-
- assert_eq!(
- select_dict
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn mixed_select_dict() {
- let mut select_dict = SelectDict::default();
- select_dict.insert(
- "Greeting".to_owned(),
- "Hello".to_owned(),
- Some("platform".to_owned()),
- );
- select_dict.insert("Message".to_owned(), "Goodbye".to_owned(), None);
-
- let expected_starlark = indoc! {r#"
- select({
- "platform": {
- "Greeting": "Hello",
- "Message": "Goodbye",
- },
- "//conditions:default": {
- "Message": "Goodbye",
- },
- })
- "#};
-
- assert_eq!(
- select_dict
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn remap_select_list_configurations() {
- let mut select_list = SelectList::default();
- select_list.insert("dep-a".to_owned(), Some("cfg(macos)".to_owned()));
- select_list.insert("dep-b".to_owned(), Some("cfg(macos)".to_owned()));
- select_list.insert("dep-d".to_owned(), Some("cfg(macos)".to_owned()));
- select_list.insert("dep-a".to_owned(), Some("cfg(x86_64)".to_owned()));
- select_list.insert("dep-c".to_owned(), Some("cfg(x86_64)".to_owned()));
- select_list.insert("dep-e".to_owned(), Some("cfg(pdp11)".to_owned()));
- select_list.insert("dep-d".to_owned(), None);
- select_list.insert("dep-f".to_owned(), Some("@platforms//os:magic".to_owned()));
- select_list.insert("dep-g".to_owned(), Some("//another:platform".to_owned()));
-
- let mapping = BTreeMap::from([
- (
- "cfg(macos)".to_owned(),
- BTreeSet::from(["x86_64-macos".to_owned(), "aarch64-macos".to_owned()]),
- ),
- (
- "cfg(x86_64)".to_owned(),
- BTreeSet::from(["x86_64-linux".to_owned(), "x86_64-macos".to_owned()]),
- ),
- ]);
-
- let mut expected = SelectList::default();
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-a".to_owned(),
- original_configurations: Some(BTreeSet::from([
- "cfg(macos)".to_owned(),
- "cfg(x86_64)".to_owned(),
- ])),
- },
- Some("x86_64-macos".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-b".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(macos)".to_owned()])),
- },
- Some("x86_64-macos".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-c".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(x86_64)".to_owned()])),
- },
- Some("x86_64-macos".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-a".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(macos)".to_owned()])),
- },
- Some("aarch64-macos".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-b".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(macos)".to_owned()])),
- },
- Some("aarch64-macos".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-a".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(x86_64)".to_owned()])),
- },
- Some("x86_64-linux".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-c".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(x86_64)".to_owned()])),
- },
- Some("x86_64-linux".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-d".to_owned(),
- original_configurations: None,
- },
- None,
- );
- expected.unmapped.insert(WithOriginalConfigurations {
- value: "dep-e".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(pdp11)".to_owned()])),
- });
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-f".to_owned(),
- original_configurations: Some(BTreeSet::from(["@platforms//os:magic".to_owned()])),
- },
- Some("@platforms//os:magic".to_owned()),
- );
- expected.insert(
- WithOriginalConfigurations {
- value: "dep-g".to_owned(),
- original_configurations: Some(BTreeSet::from(["//another:platform".to_owned()])),
- },
- Some("//another:platform".to_owned()),
- );
-
- let select_list = select_list.remap_configurations(&mapping);
- assert_eq!(select_list, expected);
-
- let expected_starlark = indoc! {r#"
- [
- "dep-d",
- ] + selects.with_unmapped({
- "//another:platform": [
- "dep-g", # //another:platform
- ],
- "@platforms//os:magic": [
- "dep-f", # @platforms//os:magic
- ],
- "aarch64-macos": [
- "dep-a", # cfg(macos)
- "dep-b", # cfg(macos)
- ],
- "x86_64-linux": [
- "dep-a", # cfg(x86_64)
- "dep-c", # cfg(x86_64)
- ],
- "x86_64-macos": [
- "dep-a", # cfg(macos), cfg(x86_64)
- "dep-b", # cfg(macos)
- "dep-c", # cfg(x86_64)
- ],
- "//conditions:default": [],
- selects.NO_MATCHING_PLATFORM_TRIPLES: [
- "dep-e", # cfg(pdp11)
- ],
- })
- "#};
-
- assert_eq!(
- select_list
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-
- #[test]
- fn remap_select_dict_configurations() {
- let mut select_dict = SelectDict::default();
- select_dict.insert(
- "dep-a".to_owned(),
- "a".to_owned(),
- Some("cfg(macos)".to_owned()),
- );
- select_dict.insert(
- "dep-b".to_owned(),
- "b".to_owned(),
- Some("cfg(macos)".to_owned()),
- );
- select_dict.insert(
- "dep-d".to_owned(),
- "d".to_owned(),
- Some("cfg(macos)".to_owned()),
- );
- select_dict.insert(
- "dep-a".to_owned(),
- "a".to_owned(),
- Some("cfg(x86_64)".to_owned()),
- );
- select_dict.insert(
- "dep-c".to_owned(),
- "c".to_owned(),
- Some("cfg(x86_64)".to_owned()),
- );
- select_dict.insert(
- "dep-e".to_owned(),
- "e".to_owned(),
- Some("cfg(pdp11)".to_owned()),
- );
- select_dict.insert("dep-d".to_owned(), "d".to_owned(), None);
- select_dict.insert(
- "dep-f".to_owned(),
- "f".to_owned(),
- Some("@platforms//os:magic".to_owned()),
- );
- select_dict.insert(
- "dep-g".to_owned(),
- "g".to_owned(),
- Some("//another:platform".to_owned()),
- );
-
- let mapping = BTreeMap::from([
- (
- "cfg(macos)".to_owned(),
- BTreeSet::from(["x86_64-macos".to_owned(), "aarch64-macos".to_owned()]),
- ),
- (
- "cfg(x86_64)".to_owned(),
- BTreeSet::from(["x86_64-linux".to_owned(), "x86_64-macos".to_owned()]),
- ),
- ]);
-
- let mut expected = SelectDict::default();
- expected.insert(
- "dep-a".to_string(),
- WithOriginalConfigurations {
- value: "a".to_owned(),
- original_configurations: Some(BTreeSet::from([
- "cfg(macos)".to_owned(),
- "cfg(x86_64)".to_owned(),
- ])),
- },
- Some("x86_64-macos".to_owned()),
- );
- expected.insert(
- "dep-b".to_string(),
- WithOriginalConfigurations {
- value: "b".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(macos)".to_owned()])),
- },
- Some("x86_64-macos".to_owned()),
- );
- expected.insert(
- "dep-c".to_string(),
- WithOriginalConfigurations {
- value: "c".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(x86_64)".to_owned()])),
- },
- Some("x86_64-macos".to_owned()),
- );
- expected.insert(
- "dep-a".to_string(),
- WithOriginalConfigurations {
- value: "a".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(macos)".to_owned()])),
- },
- Some("aarch64-macos".to_owned()),
- );
- expected.insert(
- "dep-b".to_string(),
- WithOriginalConfigurations {
- value: "b".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(macos)".to_owned()])),
- },
- Some("aarch64-macos".to_owned()),
- );
- expected.insert(
- "dep-a".to_string(),
- WithOriginalConfigurations {
- value: "a".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(x86_64)".to_owned()])),
- },
- Some("x86_64-linux".to_owned()),
- );
- expected.insert(
- "dep-c".to_string(),
- WithOriginalConfigurations {
- value: "c".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(x86_64)".to_owned()])),
- },
- Some("x86_64-linux".to_owned()),
- );
- expected.insert(
- "dep-d".to_string(),
- WithOriginalConfigurations {
- value: "d".to_owned(),
- original_configurations: None,
- },
- None,
- );
- expected.unmapped.insert(
- "dep-e".to_string(),
- WithOriginalConfigurations {
- value: "e".to_owned(),
- original_configurations: Some(BTreeSet::from(["cfg(pdp11)".to_owned()])),
- },
- );
- expected.insert(
- "dep-f".to_string(),
- WithOriginalConfigurations {
- value: "f".to_owned(),
- original_configurations: Some(BTreeSet::from(["@platforms//os:magic".to_owned()])),
- },
- Some("@platforms//os:magic".to_owned()),
- );
- expected.insert(
- "dep-g".to_string(),
- WithOriginalConfigurations {
- value: "g".to_owned(),
- original_configurations: Some(BTreeSet::from(["//another:platform".to_owned()])),
- },
- Some("//another:platform".to_owned()),
- );
-
- let select_dict = select_dict.remap_configurations(&mapping);
- assert_eq!(select_dict, expected);
-
- let expected_starlark = indoc! {r#"
- selects.with_unmapped({
- "//another:platform": {
- "dep-d": "d",
- "dep-g": "g", # //another:platform
- },
- "@platforms//os:magic": {
- "dep-d": "d",
- "dep-f": "f", # @platforms//os:magic
- },
- "aarch64-macos": {
- "dep-a": "a", # cfg(macos)
- "dep-b": "b", # cfg(macos)
- "dep-d": "d",
- },
- "x86_64-linux": {
- "dep-a": "a", # cfg(x86_64)
- "dep-c": "c", # cfg(x86_64)
- "dep-d": "d",
- },
- "x86_64-macos": {
- "dep-a": "a", # cfg(macos), cfg(x86_64)
- "dep-b": "b", # cfg(macos)
- "dep-c": "c", # cfg(x86_64)
- "dep-d": "d",
- },
- "//conditions:default": {
- "dep-d": "d",
- },
- selects.NO_MATCHING_PLATFORM_TRIPLES: {
- "dep-e": "e", # cfg(pdp11)
- },
- })
- "#};
-
- assert_eq!(
- select_dict
- .serialize_starlark(serde_starlark::Serializer)
- .unwrap(),
- expected_starlark,
- );
- }
-}
diff --git a/crate_universe/src/utils/starlark/select_dict.rs b/crate_universe/src/utils/starlark/select_dict.rs
new file mode 100644
index 0000000..28cbfaa
--- /dev/null
+++ b/crate_universe/src/utils/starlark/select_dict.rs
@@ -0,0 +1,521 @@
+use std::collections::{BTreeMap, BTreeSet};
+use std::fmt::Debug;
+
+use serde::ser::{SerializeMap, Serializer};
+use serde::Serialize;
+use serde_starlark::{FunctionCall, MULTILINE};
+
+use crate::select::{Select, SelectableValue};
+use crate::utils::starlark::{
+ looks_like_bazel_configuration_label, NoMatchingPlatformTriples, WithOriginalConfigurations,
+};
+
+#[derive(Debug, PartialEq, Eq)]
+pub struct SelectDict<T>
+where
+ T: SelectableValue,
+{
+ // Invariant: keys in this map are not in any of the inner maps of `selects`.
+ common: BTreeMap<String, T>,
+ // Invariant: none of the inner maps are empty.
+ selects: BTreeMap<String, BTreeMap<String, WithOriginalConfigurations<T>>>,
+ // Elements from the `Select` whose configuration did not get mapped to any
+ // new configuration. They could be ignored, but are preserved here to
+ // generate comments that help the user understand what happened.
+ unmapped: BTreeMap<String, BTreeMap<String, T>>,
+}
+
+impl<T> SelectDict<T>
+where
+ T: SelectableValue,
+{
+ /// Re-keys the provided Select by the given configuration mapping.
+ /// This mapping maps from configurations in the input Select to sets
+ /// of configurations in the output SelectDict.
+ pub fn new(
+ select: Select<BTreeMap<String, T>>,
+ platforms: &BTreeMap<String, BTreeSet<String>>,
+ ) -> Self {
+ let (common, selects) = select.into_parts();
+
+ // Map new configuration -> WithOriginalConfigurations(value, old configurations).
+ let mut remapped: BTreeMap<String, BTreeMap<String, WithOriginalConfigurations<T>>> =
+ BTreeMap::new();
+ // Map unknown configuration -> value.
+ let mut unmapped: BTreeMap<String, BTreeMap<String, T>> = BTreeMap::new();
+
+ for (original_configuration, entries) in selects {
+ match platforms.get(&original_configuration) {
+ Some(configurations) => {
+ for configuration in configurations {
+ for (key, value) in &entries {
+ remapped
+ .entry(configuration.clone())
+ .or_default()
+ .entry(key.clone())
+ .or_insert_with(|| WithOriginalConfigurations {
+ value: value.clone(),
+ original_configurations: BTreeSet::new(),
+ })
+ .original_configurations
+ .insert(original_configuration.clone());
+ }
+ }
+ }
+ None => {
+ for (key, value) in entries {
+ if looks_like_bazel_configuration_label(&original_configuration) {
+ remapped
+ .entry(original_configuration.clone())
+ .or_default()
+ .entry(key)
+ .or_insert_with(|| WithOriginalConfigurations {
+ value: value.clone(),
+ original_configurations: BTreeSet::new(),
+ })
+ .original_configurations
+ .insert(original_configuration.clone());
+ } else {
+ unmapped
+ .entry(original_configuration.clone())
+ .or_default()
+ .insert(key, value);
+ };
+ }
+ }
+ }
+ }
+
+ Self {
+ common,
+ selects: remapped,
+ unmapped,
+ }
+ }
+
+ pub fn is_empty(&self) -> bool {
+ self.common.is_empty() && self.selects.is_empty() && self.unmapped.is_empty()
+ }
+}
+
+impl<T> Serialize for SelectDict<T>
+where
+ T: SelectableValue,
+{
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ // If there are no platform-specific entries, we output just an ordinary
+ // dict.
+ //
+ // If there are platform-specific ones, we use the following. Ideally it
+ // could be done as `dicts.add({...}, select({...}))` but bazel_skylib's
+ // dicts.add does not support selects.
+ //
+ // select({
+ // "configuration": {
+ // "common-key": "common-value",
+ // "plat-key": "plat-value", # cfg(whatever)
+ // },
+ // "//conditions:default": {
+ // "common-key": "common-value",
+ // },
+ // })
+ //
+ // If there are unmapped entries, we include them like this:
+ //
+ // selects.with_unmapped({
+ // "configuration": {
+ // "common-key": "common-value",
+ // "plat-key": "plat-value", # cfg(whatever)
+ // },
+ // "//conditions:default": {
+ // "common-key": "common-value",
+ // },
+ // selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ // "cfg(obscure): {
+ // "unmapped-key": "unmapped-value",
+ // },
+ // },
+ // })
+
+ if self.selects.is_empty() && self.unmapped.is_empty() {
+ return self.common.serialize(serializer);
+ }
+
+ struct SelectInner<'a, T>(&'a SelectDict<T>)
+ where
+ T: SelectableValue;
+
+ impl<'a, T> Serialize for SelectInner<'a, T>
+ where
+ T: SelectableValue,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (configuration, dict) in &self.0.selects {
+ #[derive(Serialize)]
+ #[serde(untagged)]
+ enum Either<'a, T> {
+ Common(&'a T),
+ Selects(&'a WithOriginalConfigurations<T>),
+ }
+
+ let mut combined = BTreeMap::new();
+ combined.extend(
+ self.0
+ .common
+ .iter()
+ .map(|(key, value)| (key, Either::Common(value))),
+ );
+ combined.extend(
+ dict.iter()
+ .map(|(key, value)| (key, Either::Selects(value))),
+ );
+ map.serialize_entry(configuration, &combined)?;
+ }
+ map.serialize_entry("//conditions:default", &self.0.common)?;
+ if !self.0.unmapped.is_empty() {
+ struct SelectUnmapped<'a, T>(&'a BTreeMap<String, BTreeMap<String, T>>)
+ where
+ T: SelectableValue;
+
+ impl<'a, T> Serialize for SelectUnmapped<'a, T>
+ where
+ T: SelectableValue,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (cfg, dict) in self.0.iter() {
+ map.serialize_entry(cfg, dict)?;
+ }
+ map.end()
+ }
+ }
+
+ map.serialize_entry(
+ &NoMatchingPlatformTriples,
+ &SelectUnmapped(&self.0.unmapped),
+ )?;
+ }
+ map.end()
+ }
+ }
+
+ let function = if self.unmapped.is_empty() {
+ "select"
+ } else {
+ "selects.with_unmapped"
+ };
+
+ FunctionCall::new(function, [SelectInner(self)]).serialize(serializer)
+ }
+}
+
+#[cfg(test)]
+mod test {
+ use super::*;
+
+ use indoc::indoc;
+
+ #[test]
+ fn empty_select_dict() {
+ let select_dict: SelectDict<String> =
+ SelectDict::new(Default::default(), &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ {}
+ "#};
+
+ assert_eq!(
+ select_dict.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn no_platform_specific_select_dict() {
+ let mut select: Select<BTreeMap<String, String>> = Select::default();
+ select.insert(("Greeting".to_owned(), "Hello".to_owned()), None);
+
+ let select_dict = SelectDict::new(select, &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ {
+ "Greeting": "Hello",
+ }
+ "#};
+
+ assert_eq!(
+ select_dict.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn only_platform_specific_select_dict() {
+ let mut select: Select<BTreeMap<String, String>> = Select::default();
+ select.insert(
+ ("Greeting".to_owned(), "Hello".to_owned()),
+ Some("platform".to_owned()),
+ );
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_dict = SelectDict::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ select({
+ "platform": {
+ "Greeting": "Hello", # platform
+ },
+ "//conditions:default": {},
+ })
+ "#};
+
+ assert_eq!(
+ select_dict.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn mixed_select_dict() {
+ let mut select: Select<BTreeMap<String, String>> = Select::default();
+ select.insert(
+ ("Greeting".to_owned(), "Hello".to_owned()),
+ Some("platform".to_owned()),
+ );
+ select.insert(("Message".to_owned(), "Goodbye".to_owned()), None);
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_dict = SelectDict::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ select({
+ "platform": {
+ "Greeting": "Hello", # platform
+ "Message": "Goodbye",
+ },
+ "//conditions:default": {
+ "Message": "Goodbye",
+ },
+ })
+ "#};
+
+ assert_eq!(
+ select_dict.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn remap_select_dict_configurations() {
+ let mut select: Select<BTreeMap<String, String>> = Select::default();
+ select.insert(
+ ("dep-a".to_owned(), "a".to_owned()),
+ Some("cfg(macos)".to_owned()),
+ );
+ select.insert(
+ ("dep-b".to_owned(), "b".to_owned()),
+ Some("cfg(macos)".to_owned()),
+ );
+ select.insert(
+ ("dep-d".to_owned(), "d".to_owned()),
+ Some("cfg(macos)".to_owned()),
+ );
+ select.insert(
+ ("dep-a".to_owned(), "a".to_owned()),
+ Some("cfg(x86_64)".to_owned()),
+ );
+ select.insert(
+ ("dep-c".to_owned(), "c".to_owned()),
+ Some("cfg(x86_64)".to_owned()),
+ );
+ select.insert(
+ ("dep-e".to_owned(), "e".to_owned()),
+ Some("cfg(pdp11)".to_owned()),
+ );
+ select.insert(("dep-d".to_owned(), "d".to_owned()), None);
+ select.insert(
+ ("dep-f".to_owned(), "f".to_owned()),
+ Some("@platforms//os:magic".to_owned()),
+ );
+ select.insert(
+ ("dep-g".to_owned(), "g".to_owned()),
+ Some("//another:platform".to_owned()),
+ );
+
+ let platforms = BTreeMap::from([
+ (
+ "cfg(macos)".to_owned(),
+ BTreeSet::from(["x86_64-macos".to_owned(), "aarch64-macos".to_owned()]),
+ ),
+ (
+ "cfg(x86_64)".to_owned(),
+ BTreeSet::from(["x86_64-linux".to_owned(), "x86_64-macos".to_owned()]),
+ ),
+ ]);
+
+ let select_dict = SelectDict::new(select, &platforms);
+
+ let expected = SelectDict {
+ common: BTreeMap::from([("dep-d".to_string(), "d".to_owned())]),
+ selects: BTreeMap::from([
+ (
+ "x86_64-macos".to_owned(),
+ BTreeMap::from([
+ (
+ "dep-a".to_string(),
+ WithOriginalConfigurations {
+ value: "a".to_owned(),
+ original_configurations: BTreeSet::from([
+ "cfg(macos)".to_owned(),
+ "cfg(x86_64)".to_owned(),
+ ]),
+ },
+ ),
+ (
+ "dep-b".to_string(),
+ WithOriginalConfigurations {
+ value: "b".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ ),
+ (
+ "dep-c".to_string(),
+ WithOriginalConfigurations {
+ value: "c".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ),
+ ]),
+ ),
+ (
+ "aarch64-macos".to_owned(),
+ BTreeMap::from([
+ (
+ "dep-a".to_string(),
+ WithOriginalConfigurations {
+ value: "a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ ),
+ (
+ "dep-b".to_string(),
+ WithOriginalConfigurations {
+ value: "b".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ ),
+ ]),
+ ),
+ (
+ "x86_64-linux".to_owned(),
+ BTreeMap::from([
+ (
+ "dep-a".to_string(),
+ WithOriginalConfigurations {
+ value: "a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ),
+ (
+ "dep-c".to_string(),
+ WithOriginalConfigurations {
+ value: "c".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ),
+ ]),
+ ),
+ (
+ "@platforms//os:magic".to_owned(),
+ BTreeMap::from([(
+ "dep-f".to_string(),
+ WithOriginalConfigurations {
+ value: "f".to_owned(),
+ original_configurations: BTreeSet::from([
+ "@platforms//os:magic".to_owned()
+ ]),
+ },
+ )]),
+ ),
+ (
+ "//another:platform".to_owned(),
+ BTreeMap::from([(
+ "dep-g".to_string(),
+ WithOriginalConfigurations {
+ value: "g".to_owned(),
+ original_configurations: BTreeSet::from([
+ "//another:platform".to_owned()
+ ]),
+ },
+ )]),
+ ),
+ ]),
+ unmapped: BTreeMap::from([(
+ "cfg(pdp11)".to_owned(),
+ BTreeMap::from([("dep-e".to_string(), "e".to_owned())]),
+ )]),
+ };
+
+ assert_eq!(select_dict, expected);
+
+ let expected_starlark = indoc! {r#"
+ selects.with_unmapped({
+ "//another:platform": {
+ "dep-d": "d",
+ "dep-g": "g", # //another:platform
+ },
+ "@platforms//os:magic": {
+ "dep-d": "d",
+ "dep-f": "f", # @platforms//os:magic
+ },
+ "aarch64-macos": {
+ "dep-a": "a", # cfg(macos)
+ "dep-b": "b", # cfg(macos)
+ "dep-d": "d",
+ },
+ "x86_64-linux": {
+ "dep-a": "a", # cfg(x86_64)
+ "dep-c": "c", # cfg(x86_64)
+ "dep-d": "d",
+ },
+ "x86_64-macos": {
+ "dep-a": "a", # cfg(macos), cfg(x86_64)
+ "dep-b": "b", # cfg(macos)
+ "dep-c": "c", # cfg(x86_64)
+ "dep-d": "d",
+ },
+ "//conditions:default": {
+ "dep-d": "d",
+ },
+ selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ "cfg(pdp11)": {
+ "dep-e": "e",
+ },
+ },
+ })
+ "#};
+
+ assert_eq!(
+ select_dict.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+}
diff --git a/crate_universe/src/utils/starlark/select_list.rs b/crate_universe/src/utils/starlark/select_list.rs
new file mode 100644
index 0000000..46604c7
--- /dev/null
+++ b/crate_universe/src/utils/starlark/select_list.rs
@@ -0,0 +1,441 @@
+use std::collections::{BTreeMap, BTreeSet};
+use std::fmt::Debug;
+
+use serde::ser::{SerializeMap, SerializeTupleStruct, Serializer};
+use serde::Serialize;
+use serde_starlark::{FunctionCall, MULTILINE};
+
+use crate::select::{Select, SelectableValue};
+use crate::utils::starlark::serialize::MultilineArray;
+use crate::utils::starlark::{
+ looks_like_bazel_configuration_label, NoMatchingPlatformTriples, WithOriginalConfigurations,
+};
+
+#[derive(Debug, PartialEq, Eq)]
+pub struct SelectList<T>
+where
+ T: SelectableValue,
+{
+ common: Vec<T>,
+ selects: BTreeMap<String, Vec<WithOriginalConfigurations<T>>>,
+ // Elements from the `Select` whose configuration did not get mapped to any
+ // new configuration. They could be ignored, but are preserved here to
+ // generate comments that help the user understand what happened.
+ unmapped: BTreeMap<String, Vec<T>>,
+}
+
+impl<T> SelectList<T>
+where
+ T: SelectableValue,
+{
+ /// Re-keys the provided Select by the given configuration mapping.
+ /// This mapping maps from configurations in the input Select to sets of
+ /// configurations in the output SelectList.
+ pub fn new(select: Select<Vec<T>>, platforms: &BTreeMap<String, BTreeSet<String>>) -> Self {
+ let (common, selects) = select.into_parts();
+
+ // Map new configuration -> WithOriginalConfigurations(value, old configuration).
+ let mut remapped: BTreeMap<String, Vec<WithOriginalConfigurations<T>>> = BTreeMap::new();
+ // Map unknown configuration -> value.
+ let mut unmapped: BTreeMap<String, Vec<T>> = BTreeMap::new();
+
+ for (original_configuration, values) in selects {
+ match platforms.get(&original_configuration) {
+ Some(configurations) => {
+ for configuration in configurations {
+ for value in &values {
+ remapped.entry(configuration.clone()).or_default().push(
+ WithOriginalConfigurations {
+ value: value.clone(),
+ original_configurations: BTreeSet::from([
+ original_configuration.clone(),
+ ]),
+ },
+ );
+ }
+ }
+ }
+ None => {
+ if looks_like_bazel_configuration_label(&original_configuration) {
+ remapped
+ .entry(original_configuration.clone())
+ .or_default()
+ .extend(values.into_iter().map(|value| WithOriginalConfigurations {
+ value,
+ original_configurations: BTreeSet::from([
+ original_configuration.clone(),
+ ]),
+ }));
+ } else {
+ unmapped
+ .entry(original_configuration.clone())
+ .or_default()
+ .extend(values.into_iter());
+ }
+ }
+ }
+ }
+
+ Self {
+ common,
+ selects: remapped,
+ unmapped,
+ }
+ }
+
+ /// Determine whether or not the select should be serialized
+ pub fn is_empty(&self) -> bool {
+ self.common.is_empty() && self.selects.is_empty() && self.unmapped.is_empty()
+ }
+}
+
+impl<T> Serialize for SelectList<T>
+where
+ T: SelectableValue,
+{
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ // Output looks like:
+ //
+ // [
+ // "common...",
+ // ] + select({
+ // "configuration": [
+ // "value...", # cfg(whatever)
+ // ],
+ // "//conditions:default": [],
+ // })
+ //
+ // The common part and select are each omitted if they are empty (except
+ // if the entire thing is empty, in which case we serialize the common
+ // part to get an empty array).
+ //
+ // If there are unmapped entries, we include them like this:
+ //
+ // [
+ // "common...",
+ // ] + selects.with_unmapped({
+ // "configuration": [
+ // "value...", # cfg(whatever)
+ // ],
+ // "//conditions:default": [],
+ // selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ // "cfg(obscure)": [
+ // "value...",
+ // ],
+ // },
+ // })
+
+ let mut plus = serializer.serialize_tuple_struct("+", MULTILINE)?;
+
+ if !self.common.is_empty() || self.selects.is_empty() && self.unmapped.is_empty() {
+ plus.serialize_field(&MultilineArray(&self.common))?;
+ }
+
+ if !self.selects.is_empty() || !self.unmapped.is_empty() {
+ struct SelectInner<'a, T>(&'a SelectList<T>)
+ where
+ T: SelectableValue;
+
+ impl<'a, T> Serialize for SelectInner<'a, T>
+ where
+ T: SelectableValue,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (cfg, values) in self.0.selects.iter() {
+ map.serialize_entry(cfg, &MultilineArray(values))?;
+ }
+ map.serialize_entry("//conditions:default", &[] as &[T])?;
+ if !self.0.unmapped.is_empty() {
+ struct SelectUnmapped<'a, T>(&'a BTreeMap<String, Vec<T>>)
+ where
+ T: SelectableValue;
+
+ impl<'a, T> Serialize for SelectUnmapped<'a, T>
+ where
+ T: SelectableValue,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (cfg, values) in self.0.iter() {
+ map.serialize_entry(cfg, &MultilineArray(values))?;
+ }
+ map.end()
+ }
+ }
+
+ map.serialize_entry(
+ &NoMatchingPlatformTriples,
+ &SelectUnmapped(&self.0.unmapped),
+ )?;
+ }
+ map.end()
+ }
+ }
+
+ let function = if self.unmapped.is_empty() {
+ "select"
+ } else {
+ "selects.with_unmapped"
+ };
+
+ plus.serialize_field(&FunctionCall::new(function, [SelectInner(self)]))?;
+ }
+
+ plus.end()
+ }
+}
+
+#[cfg(test)]
+mod test {
+ use super::*;
+
+ use indoc::indoc;
+
+ #[test]
+ fn empty_select_list() {
+ let select_list: SelectList<String> =
+ SelectList::new(Default::default(), &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ []
+ "#};
+
+ assert_eq!(
+ select_list.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn no_platform_specific_empty_select_list() {
+ let mut select: Select<Vec<String>> = Select::default();
+ select.insert("Hello".to_owned(), None);
+
+ let select_list = SelectList::new(select, &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ [
+ "Hello",
+ ]
+ "#};
+
+ assert_eq!(
+ select_list.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn only_platform_specific_empty_select_list() {
+ let mut select: Select<Vec<String>> = Select::default();
+ select.insert("Hello".to_owned(), Some("platform".to_owned()));
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_list = SelectList::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ select({
+ "platform": [
+ "Hello", # platform
+ ],
+ "//conditions:default": [],
+ })
+ "#};
+
+ assert_eq!(
+ select_list.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn mixed_empty_select_list() {
+ let mut select: Select<Vec<String>> = Select::default();
+ select.insert("Hello".to_owned(), Some("platform".to_owned()));
+ select.insert("Goodbye".to_owned(), None);
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_list = SelectList::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ [
+ "Goodbye",
+ ] + select({
+ "platform": [
+ "Hello", # platform
+ ],
+ "//conditions:default": [],
+ })
+ "#};
+
+ assert_eq!(
+ select_list.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn remap_empty_select_list_configurations() {
+ let mut select: Select<Vec<String>> = Select::default();
+ select.insert("dep-a".to_owned(), Some("cfg(macos)".to_owned()));
+ select.insert("dep-b".to_owned(), Some("cfg(macos)".to_owned()));
+ select.insert("dep-d".to_owned(), Some("cfg(macos)".to_owned()));
+ select.insert("dep-a".to_owned(), Some("cfg(x86_64)".to_owned()));
+ select.insert("dep-c".to_owned(), Some("cfg(x86_64)".to_owned()));
+ select.insert("dep-e".to_owned(), Some("cfg(pdp11)".to_owned()));
+ select.insert("dep-d".to_owned(), None);
+ select.insert("dep-f".to_owned(), Some("@platforms//os:magic".to_owned()));
+ select.insert("dep-g".to_owned(), Some("//another:platform".to_owned()));
+
+ let platforms = BTreeMap::from([
+ (
+ "cfg(macos)".to_owned(),
+ BTreeSet::from(["x86_64-macos".to_owned(), "aarch64-macos".to_owned()]),
+ ),
+ (
+ "cfg(x86_64)".to_owned(),
+ BTreeSet::from(["x86_64-linux".to_owned(), "x86_64-macos".to_owned()]),
+ ),
+ ]);
+
+ let select_list = SelectList::new(select, &platforms);
+
+ let expected = SelectList {
+ common: Vec::from(["dep-d".to_owned()]),
+ selects: BTreeMap::from([
+ (
+ "x86_64-macos".to_owned(),
+ Vec::from([
+ WithOriginalConfigurations {
+ value: "dep-a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-b".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-d".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-c".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ]),
+ ),
+ (
+ "aarch64-macos".to_owned(),
+ Vec::from([
+ WithOriginalConfigurations {
+ value: "dep-a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-b".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-d".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ ]),
+ ),
+ (
+ "x86_64-linux".to_owned(),
+ Vec::from([
+ WithOriginalConfigurations {
+ value: "dep-a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-c".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ]),
+ ),
+ (
+ "@platforms//os:magic".to_owned(),
+ Vec::from([WithOriginalConfigurations {
+ value: "dep-f".to_owned(),
+ original_configurations: BTreeSet::from(
+ ["@platforms//os:magic".to_owned()],
+ ),
+ }]),
+ ),
+ (
+ "//another:platform".to_owned(),
+ Vec::from([WithOriginalConfigurations {
+ value: "dep-g".to_owned(),
+ original_configurations: BTreeSet::from(["//another:platform".to_owned()]),
+ }]),
+ ),
+ ]),
+ unmapped: BTreeMap::from([("cfg(pdp11)".to_owned(), Vec::from(["dep-e".to_owned()]))]),
+ };
+
+ assert_eq!(select_list, expected);
+
+ let expected_starlark = indoc! {r#"
+ [
+ "dep-d",
+ ] + selects.with_unmapped({
+ "//another:platform": [
+ "dep-g", # //another:platform
+ ],
+ "@platforms//os:magic": [
+ "dep-f", # @platforms//os:magic
+ ],
+ "aarch64-macos": [
+ "dep-a", # cfg(macos)
+ "dep-b", # cfg(macos)
+ "dep-d", # cfg(macos)
+ ],
+ "x86_64-linux": [
+ "dep-a", # cfg(x86_64)
+ "dep-c", # cfg(x86_64)
+ ],
+ "x86_64-macos": [
+ "dep-a", # cfg(macos)
+ "dep-b", # cfg(macos)
+ "dep-d", # cfg(macos)
+ "dep-a", # cfg(x86_64)
+ "dep-c", # cfg(x86_64)
+ ],
+ "//conditions:default": [],
+ selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ "cfg(pdp11)": [
+ "dep-e",
+ ],
+ },
+ })
+ "#};
+
+ assert_eq!(
+ select_list.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+}
diff --git a/crate_universe/src/utils/starlark/select_scalar.rs b/crate_universe/src/utils/starlark/select_scalar.rs
new file mode 100644
index 0000000..d51f785
--- /dev/null
+++ b/crate_universe/src/utils/starlark/select_scalar.rs
@@ -0,0 +1,355 @@
+use std::collections::{BTreeMap, BTreeSet};
+use std::fmt::Debug;
+
+use serde::ser::{SerializeMap, Serializer};
+use serde::Serialize;
+use serde_starlark::{FunctionCall, MULTILINE};
+
+use crate::select::{Select, SelectableScalar};
+use crate::utils::starlark::{
+ looks_like_bazel_configuration_label, NoMatchingPlatformTriples, WithOriginalConfigurations,
+};
+
+#[derive(Debug, PartialEq, Eq)]
+pub struct SelectScalar<T>
+where
+ T: SelectableScalar,
+{
+ common: Option<T>,
+ selects: BTreeMap<String, WithOriginalConfigurations<T>>,
+ // Elements from the `Select` whose configuration did not get mapped to any
+ // new configuration. They could be ignored, but are preserved here to
+ // generate comments that help the user understand what happened.
+ unmapped: BTreeMap<String, T>,
+}
+
+impl<T> SelectScalar<T>
+where
+ T: SelectableScalar,
+{
+ /// Re-keys the provided Select by the given configuration mapping.
+ /// This mapping maps from configurations in the input Select to sets of
+ /// configurations in the output SelectScalar.
+ pub fn new(select: Select<T>, platforms: &BTreeMap<String, BTreeSet<String>>) -> Self {
+ let (common, selects) = select.into_parts();
+
+ // Map new configuration -> WithOriginalConfigurations(value, old configurations).
+ let mut remapped: BTreeMap<String, WithOriginalConfigurations<T>> = BTreeMap::new();
+ // Map unknown configuration -> value.
+ let mut unmapped: BTreeMap<String, T> = BTreeMap::new();
+
+ for (original_configuration, value) in selects {
+ match platforms.get(&original_configuration) {
+ Some(configurations) => {
+ for configuration in configurations {
+ remapped
+ .entry(configuration.clone())
+ .or_insert_with(|| WithOriginalConfigurations {
+ value: value.clone(),
+ original_configurations: BTreeSet::new(),
+ })
+ .original_configurations
+ .insert(original_configuration.clone());
+ }
+ }
+ None => {
+ if looks_like_bazel_configuration_label(&original_configuration) {
+ remapped
+ .entry(original_configuration.clone())
+ .or_insert_with(|| WithOriginalConfigurations {
+ value: value.clone(),
+ original_configurations: BTreeSet::new(),
+ })
+ .original_configurations
+ .insert(original_configuration.clone());
+ } else {
+ unmapped.insert(original_configuration.clone(), value);
+ }
+ }
+ }
+ }
+
+ Self {
+ common,
+ selects: remapped,
+ unmapped,
+ }
+ }
+
+ /// Determine whether or not the select should be serialized
+ pub fn is_empty(&self) -> bool {
+ self.common.is_none() && self.selects.is_empty() && self.unmapped.is_empty()
+ }
+}
+
+impl<T> Serialize for SelectScalar<T>
+where
+ T: SelectableScalar,
+{
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ // If there are no platform-specific entries, we output just an ordinary
+ // value.
+ //
+ // If there are platform-specific ones, we use the following.
+ //
+ // select({
+ // "configuration": "plat-value", # cfg(whatever),
+ // "//conditions:default": "common-value",
+ // })
+ //
+ // If there are unmapped entries, we include them like this:
+ //
+ // selects.with_unmapped({
+ // "configuration": "plat-value", # cfg(whatever),
+ // "//conditions:default": "common-value",
+ // selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ // "cfg(obscure)": [
+ // "unmapped-value",
+ // ],
+ // },
+ // })
+
+ if self.common.is_some() && self.selects.is_empty() && self.unmapped.is_empty() {
+ return self.common.as_ref().unwrap().serialize(serializer);
+ }
+
+ struct SelectInner<'a, T>(&'a SelectScalar<T>)
+ where
+ T: SelectableScalar;
+
+ impl<'a, T> Serialize for SelectInner<'a, T>
+ where
+ T: SelectableScalar,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (configuration, value) in self.0.selects.iter() {
+ map.serialize_entry(configuration, value)?;
+ }
+ if let Some(common) = self.0.common.as_ref() {
+ map.serialize_entry("//conditions:default", common)?;
+ }
+ if !self.0.unmapped.is_empty() {
+ struct SelectUnmapped<'a, T>(&'a BTreeMap<String, T>)
+ where
+ T: SelectableScalar;
+
+ impl<'a, T> Serialize for SelectUnmapped<'a, T>
+ where
+ T: SelectableScalar,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (cfg, value) in self.0.iter() {
+ map.serialize_entry(cfg, value)?;
+ }
+ map.end()
+ }
+ }
+
+ map.serialize_entry(
+ &NoMatchingPlatformTriples,
+ &SelectUnmapped(&self.0.unmapped),
+ )?;
+ }
+ map.end()
+ }
+ }
+
+ let function = if self.unmapped.is_empty() {
+ "select"
+ } else {
+ "selects.with_unmapped"
+ };
+
+ FunctionCall::new(function, [SelectInner(self)]).serialize(serializer)
+ }
+}
+
+#[cfg(test)]
+mod test {
+ use super::*;
+
+ use indoc::indoc;
+
+ #[test]
+ fn empty_select_value() {
+ let select_value: SelectScalar<String> =
+ SelectScalar::new(Default::default(), &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ select({})
+ "#};
+
+ assert_eq!(
+ select_value.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn no_platform_specific_select_value() {
+ let mut select: Select<String> = Select::default();
+ select.insert("Hello".to_owned(), None);
+
+ let select_value = SelectScalar::new(select, &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ "Hello"
+ "#};
+
+ assert_eq!(
+ select_value.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn only_platform_specific_select_value() {
+ let mut select: Select<String> = Select::default();
+ select.insert("Hello".to_owned(), Some("platform".to_owned()));
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_value = SelectScalar::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ select({
+ "platform": "Hello", # platform
+ })
+ "#};
+
+ assert_eq!(
+ select_value.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn mixed_select_value() {
+ let mut select: Select<String> = Select::default();
+ select.insert("Hello".to_owned(), Some("platform".to_owned()));
+ select.insert("Goodbye".to_owned(), None);
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_value = SelectScalar::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ select({
+ "platform": "Hello", # platform
+ "//conditions:default": "Goodbye",
+ })
+ "#};
+
+ assert_eq!(
+ select_value.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn remap_select_value_configurations() {
+ let mut select: Select<String> = Select::default();
+ select.insert("a".to_owned(), Some("cfg(macos)".to_owned()));
+ select.insert("a".to_owned(), Some("cfg(x86_64)".to_owned()));
+ select.insert("e".to_owned(), Some("cfg(pdp11)".to_owned()));
+ select.insert("f".to_owned(), Some("@platforms//os:magic".to_owned()));
+ select.insert("g".to_owned(), Some("//another:platform".to_owned()));
+
+ let platforms = BTreeMap::from([
+ (
+ "cfg(macos)".to_owned(),
+ BTreeSet::from(["x86_64-macos".to_owned(), "aarch64-macos".to_owned()]),
+ ),
+ (
+ "cfg(x86_64)".to_owned(),
+ BTreeSet::from(["x86_64-linux".to_owned(), "x86_64-macos".to_owned()]),
+ ),
+ ]);
+
+ let select_value = SelectScalar::new(select, &platforms);
+
+ let expected = SelectScalar {
+ common: None,
+ selects: BTreeMap::from([
+ (
+ "x86_64-macos".to_owned(),
+ WithOriginalConfigurations {
+ value: "a".to_owned(),
+ original_configurations: BTreeSet::from([
+ "cfg(macos)".to_owned(),
+ "cfg(x86_64)".to_owned(),
+ ]),
+ },
+ ),
+ (
+ "aarch64-macos".to_owned(),
+ WithOriginalConfigurations {
+ value: "a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ ),
+ (
+ "x86_64-linux".to_owned(),
+ WithOriginalConfigurations {
+ value: "a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ),
+ (
+ "@platforms//os:magic".to_owned(),
+ WithOriginalConfigurations {
+ value: "f".to_owned(),
+ original_configurations: BTreeSet::from(
+ ["@platforms//os:magic".to_owned()],
+ ),
+ },
+ ),
+ (
+ "//another:platform".to_owned(),
+ WithOriginalConfigurations {
+ value: "g".to_owned(),
+ original_configurations: BTreeSet::from(["//another:platform".to_owned()]),
+ },
+ ),
+ ]),
+ unmapped: BTreeMap::from([("cfg(pdp11)".to_owned(), "e".to_owned())]),
+ };
+
+ assert_eq!(select_value, expected);
+
+ let expected_starlark = indoc! {r#"
+ selects.with_unmapped({
+ "//another:platform": "g", # //another:platform
+ "@platforms//os:magic": "f", # @platforms//os:magic
+ "aarch64-macos": "a", # cfg(macos)
+ "x86_64-linux": "a", # cfg(x86_64)
+ "x86_64-macos": "a", # cfg(macos), cfg(x86_64)
+ selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ "cfg(pdp11)": "e",
+ },
+ })
+ "#};
+
+ assert_eq!(
+ select_value.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+}
diff --git a/crate_universe/src/utils/starlark/select_set.rs b/crate_universe/src/utils/starlark/select_set.rs
new file mode 100644
index 0000000..65ca1f4
--- /dev/null
+++ b/crate_universe/src/utils/starlark/select_set.rs
@@ -0,0 +1,449 @@
+use std::collections::{BTreeMap, BTreeSet};
+use std::fmt::Debug;
+
+use serde::ser::{SerializeMap, SerializeTupleStruct, Serializer};
+use serde::Serialize;
+use serde_starlark::{FunctionCall, MULTILINE};
+
+use crate::select::{Select, SelectableOrderedValue};
+use crate::utils::starlark::serialize::MultilineArray;
+use crate::utils::starlark::{
+ looks_like_bazel_configuration_label, NoMatchingPlatformTriples, WithOriginalConfigurations,
+};
+
+#[derive(Debug, PartialEq, Eq)]
+pub struct SelectSet<T>
+where
+ T: SelectableOrderedValue,
+{
+ // Invariant: any T in `common` is not anywhere in `selects`.
+ common: BTreeSet<T>,
+ // Invariant: none of the sets are empty.
+ selects: BTreeMap<String, BTreeSet<WithOriginalConfigurations<T>>>,
+ // Elements from the `Select` whose configuration did not get mapped to any
+ // new configuration. They could be ignored, but are preserved here to
+ // generate comments that help the user understand what happened.
+ unmapped: BTreeMap<String, BTreeSet<T>>,
+}
+
+impl<T> SelectSet<T>
+where
+ T: SelectableOrderedValue,
+{
+ /// Re-keys the provided Select by the given configuration mapping.
+ /// This mapping maps from configurations in the input Select to sets of
+ /// configurations in the output SelectSet.
+ pub fn new(
+ select: Select<BTreeSet<T>>,
+ platforms: &BTreeMap<String, BTreeSet<String>>,
+ ) -> Self {
+ let (common, selects) = select.into_parts();
+
+ // Map new configuration -> value -> old configurations.
+ let mut remapped: BTreeMap<String, BTreeMap<T, BTreeSet<String>>> = BTreeMap::new();
+ // Map unknown configuration -> value.
+ let mut unmapped: BTreeMap<String, BTreeSet<T>> = BTreeMap::new();
+
+ for (original_configuration, values) in selects {
+ match platforms.get(&original_configuration) {
+ Some(configurations) => {
+ for configuration in configurations {
+ for value in &values {
+ remapped
+ .entry(configuration.clone())
+ .or_default()
+ .entry(value.clone())
+ .or_default()
+ .insert(original_configuration.clone());
+ }
+ }
+ }
+ None => {
+ if looks_like_bazel_configuration_label(&original_configuration) {
+ let destination =
+ remapped.entry(original_configuration.clone()).or_default();
+ for value in values {
+ destination
+ .entry(value)
+ .or_default()
+ .insert(original_configuration.clone());
+ }
+ } else {
+ unmapped
+ .entry(original_configuration.clone())
+ .or_default()
+ .extend(values.into_iter());
+ };
+ }
+ }
+ }
+
+ Self {
+ common,
+ selects: remapped
+ .into_iter()
+ .map(|(new_configuration, value_to_original_configuration)| {
+ (
+ new_configuration,
+ value_to_original_configuration
+ .into_iter()
+ .map(
+ |(value, original_configurations)| WithOriginalConfigurations {
+ value,
+ original_configurations,
+ },
+ )
+ .collect(),
+ )
+ })
+ .collect(),
+ unmapped,
+ }
+ }
+
+ /// Determine whether or not the select should be serialized
+ pub fn is_empty(&self) -> bool {
+ self.common.is_empty() && self.selects.is_empty() && self.unmapped.is_empty()
+ }
+}
+
+impl<T> Serialize for SelectSet<T>
+where
+ T: SelectableOrderedValue,
+{
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ // Output looks like:
+ //
+ // [
+ // "common...",
+ // ] + select({
+ // "configuration": [
+ // "value...", # cfg(whatever)
+ // ],
+ // "//conditions:default": [],
+ // })
+ //
+ // The common part and select are each omitted if they are empty (except
+ // if the entire thing is empty, in which case we serialize the common
+ // part to get an empty array).
+ //
+ // If there are unmapped entries, we include them like this:
+ //
+ // [
+ // "common...",
+ // ] + selects.with_unmapped({
+ // "configuration": [
+ // "value...", # cfg(whatever)
+ // ],
+ // "//conditions:default": [],
+ // selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ // "cfg(obscure)": [
+ // "value...",
+ // ],
+ // },
+ // })
+
+ let mut plus = serializer.serialize_tuple_struct("+", MULTILINE)?;
+
+ if !self.common.is_empty() || self.selects.is_empty() && self.unmapped.is_empty() {
+ plus.serialize_field(&MultilineArray(&self.common))?;
+ }
+
+ if !self.selects.is_empty() || !self.unmapped.is_empty() {
+ struct SelectInner<'a, T: Ord>(&'a SelectSet<T>)
+ where
+ T: SelectableOrderedValue;
+
+ impl<'a, T> Serialize for SelectInner<'a, T>
+ where
+ T: SelectableOrderedValue,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (cfg, value) in &self.0.selects {
+ map.serialize_entry(cfg, &MultilineArray(value))?;
+ }
+ map.serialize_entry("//conditions:default", &[] as &[T])?;
+ if !self.0.unmapped.is_empty() {
+ struct SelectUnmapped<'a, T>(&'a BTreeMap<String, BTreeSet<T>>)
+ where
+ T: SelectableOrderedValue;
+
+ impl<'a, T> Serialize for SelectUnmapped<'a, T>
+ where
+ T: SelectableOrderedValue,
+ {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let mut map = serializer.serialize_map(Some(MULTILINE))?;
+ for (cfg, values) in self.0.iter() {
+ map.serialize_entry(cfg, &MultilineArray(values))?;
+ }
+ map.end()
+ }
+ }
+
+ map.serialize_entry(
+ &NoMatchingPlatformTriples,
+ &SelectUnmapped(&self.0.unmapped),
+ )?;
+ }
+ map.end()
+ }
+ }
+
+ let function = if self.unmapped.is_empty() {
+ "select"
+ } else {
+ "selects.with_unmapped"
+ };
+
+ plus.serialize_field(&FunctionCall::new(function, [SelectInner(self)]))?;
+ }
+
+ plus.end()
+ }
+}
+
+#[cfg(test)]
+mod test {
+ use super::*;
+
+ use indoc::indoc;
+
+ #[test]
+ fn empty_select_set() {
+ let select_set: SelectSet<String> = SelectSet::new(Default::default(), &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ []
+ "#};
+
+ assert_eq!(
+ select_set.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn no_platform_specific_select_set() {
+ let mut select: Select<BTreeSet<String>> = Select::default();
+ select.insert("Hello".to_owned(), None);
+
+ let select_set = SelectSet::new(select, &Default::default());
+
+ let expected_starlark = indoc! {r#"
+ [
+ "Hello",
+ ]
+ "#};
+
+ assert_eq!(
+ select_set.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn only_platform_specific_select_set() {
+ let mut select: Select<BTreeSet<String>> = Select::default();
+ select.insert("Hello".to_owned(), Some("platform".to_owned()));
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_set = SelectSet::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ select({
+ "platform": [
+ "Hello", # platform
+ ],
+ "//conditions:default": [],
+ })
+ "#};
+
+ assert_eq!(
+ select_set.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn mixed_select_set() {
+ let mut select: Select<BTreeSet<String>> = Select::default();
+ select.insert("Hello".to_owned(), Some("platform".to_owned()));
+ select.insert("Goodbye".to_owned(), None);
+
+ let platforms = BTreeMap::from([(
+ "platform".to_owned(),
+ BTreeSet::from(["platform".to_owned()]),
+ )]);
+
+ let select_set = SelectSet::new(select, &platforms);
+
+ let expected_starlark = indoc! {r#"
+ [
+ "Goodbye",
+ ] + select({
+ "platform": [
+ "Hello", # platform
+ ],
+ "//conditions:default": [],
+ })
+ "#};
+
+ assert_eq!(
+ select_set.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+
+ #[test]
+ fn remap_select_set_configurations() {
+ let mut select: Select<BTreeSet<String>> = Select::default();
+ select.insert("dep-a".to_owned(), Some("cfg(macos)".to_owned()));
+ select.insert("dep-b".to_owned(), Some("cfg(macos)".to_owned()));
+ select.insert("dep-d".to_owned(), Some("cfg(macos)".to_owned()));
+ select.insert("dep-a".to_owned(), Some("cfg(x86_64)".to_owned()));
+ select.insert("dep-c".to_owned(), Some("cfg(x86_64)".to_owned()));
+ select.insert("dep-e".to_owned(), Some("cfg(pdp11)".to_owned()));
+ select.insert("dep-d".to_owned(), None);
+ select.insert("dep-f".to_owned(), Some("@platforms//os:magic".to_owned()));
+ select.insert("dep-g".to_owned(), Some("//another:platform".to_owned()));
+
+ let platforms = BTreeMap::from([
+ (
+ "cfg(macos)".to_owned(),
+ BTreeSet::from(["x86_64-macos".to_owned(), "aarch64-macos".to_owned()]),
+ ),
+ (
+ "cfg(x86_64)".to_owned(),
+ BTreeSet::from(["x86_64-linux".to_owned(), "x86_64-macos".to_owned()]),
+ ),
+ ]);
+
+ let select_set = SelectSet::new(select, &platforms);
+
+ let expected = SelectSet {
+ common: BTreeSet::from(["dep-d".to_owned()]),
+ selects: BTreeMap::from([
+ (
+ "x86_64-macos".to_owned(),
+ BTreeSet::from([
+ WithOriginalConfigurations {
+ value: "dep-a".to_owned(),
+ original_configurations: BTreeSet::from([
+ "cfg(macos)".to_owned(),
+ "cfg(x86_64)".to_owned(),
+ ]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-b".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-c".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ]),
+ ),
+ (
+ "aarch64-macos".to_owned(),
+ BTreeSet::from([
+ WithOriginalConfigurations {
+ value: "dep-a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-b".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(macos)".to_owned()]),
+ },
+ ]),
+ ),
+ (
+ "x86_64-linux".to_owned(),
+ BTreeSet::from([
+ WithOriginalConfigurations {
+ value: "dep-a".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ WithOriginalConfigurations {
+ value: "dep-c".to_owned(),
+ original_configurations: BTreeSet::from(["cfg(x86_64)".to_owned()]),
+ },
+ ]),
+ ),
+ (
+ "@platforms//os:magic".to_owned(),
+ BTreeSet::from([WithOriginalConfigurations {
+ value: "dep-f".to_owned(),
+ original_configurations: BTreeSet::from(
+ ["@platforms//os:magic".to_owned()],
+ ),
+ }]),
+ ),
+ (
+ "//another:platform".to_owned(),
+ BTreeSet::from([WithOriginalConfigurations {
+ value: "dep-g".to_owned(),
+ original_configurations: BTreeSet::from(["//another:platform".to_owned()]),
+ }]),
+ ),
+ ]),
+ unmapped: BTreeMap::from([(
+ "cfg(pdp11)".to_owned(),
+ BTreeSet::from(["dep-e".to_owned()]),
+ )]),
+ };
+
+ assert_eq!(select_set, expected);
+
+ let expected_starlark = indoc! {r#"
+ [
+ "dep-d",
+ ] + selects.with_unmapped({
+ "//another:platform": [
+ "dep-g", # //another:platform
+ ],
+ "@platforms//os:magic": [
+ "dep-f", # @platforms//os:magic
+ ],
+ "aarch64-macos": [
+ "dep-a", # cfg(macos)
+ "dep-b", # cfg(macos)
+ ],
+ "x86_64-linux": [
+ "dep-a", # cfg(x86_64)
+ "dep-c", # cfg(x86_64)
+ ],
+ "x86_64-macos": [
+ "dep-a", # cfg(macos), cfg(x86_64)
+ "dep-b", # cfg(macos)
+ "dep-c", # cfg(x86_64)
+ ],
+ "//conditions:default": [],
+ selects.NO_MATCHING_PLATFORM_TRIPLES: {
+ "cfg(pdp11)": [
+ "dep-e",
+ ],
+ },
+ })
+ "#};
+
+ assert_eq!(
+ select_set.serialize(serde_starlark::Serializer).unwrap(),
+ expected_starlark,
+ );
+ }
+}
diff --git a/crate_universe/src/utils/starlark/serialize.rs b/crate_universe/src/utils/starlark/serialize.rs
index 4d362c7..9e189a6 100644
--- a/crate_universe/src/utils/starlark/serialize.rs
+++ b/crate_universe/src/utils/starlark/serialize.rs
@@ -2,9 +2,7 @@
use serde::Serialize;
use serde_starlark::{FunctionCall, MULTILINE, ONELINE};
-use super::{
- Data, ExportsFiles, Load, Package, RustBinary, RustLibrary, RustProcMacro, SelectList,
-};
+use super::{Data, ExportsFiles, Load, Package, RustBinary, RustLibrary, RustProcMacro};
// For structs that contain #[serde(flatten)], a quirk of how Serde processes
// that attribute is that they get serialized as a map, not struct. In Starlark
@@ -53,14 +51,6 @@
}
}
-// TODO: This can go away after SelectList's derived Serialize impl (used by
-// tera) goes away and `serialize_starlark` becomes its real Serialize impl.
-#[derive(Serialize)]
-#[serde(transparent)]
-pub struct SelectListWrapper<'a, T: Ord + Serialize>(
- #[serde(serialize_with = "SelectList::serialize_starlark")] &'a SelectList<T>,
-);
-
impl Serialize for Load {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
@@ -118,7 +108,7 @@
plus.serialize_field(&self.glob)?;
}
if !self.select.is_empty() || self.glob.is_empty() {
- plus.serialize_field(&SelectListWrapper(&self.select))?;
+ plus.serialize_field(&self.select)?;
}
plus.end()
}
diff --git a/crate_universe/src/utils/target_triple.rs b/crate_universe/src/utils/target_triple.rs
index 547c617..1f76adc 100644
--- a/crate_universe/src/utils/target_triple.rs
+++ b/crate_universe/src/utils/target_triple.rs
@@ -7,6 +7,7 @@
pub struct TargetTriple(String);
impl TargetTriple {
+ #[cfg(test)]
pub fn from_bazel(bazel: String) -> Self {
Self(bazel)
}