From 555a8976f422e591322e8af06b40ed1f21806e9e Mon Sep 17 00:00:00 2001 From: Joseph Ryan Date: Thu, 30 Mar 2023 17:21:13 -0700 Subject: [PATCH] Add patching example and docs --- crate_universe/private/crates_vendor.bzl | 25 +- crate_universe/src/context/crate_context.rs | 2 +- docs/crate_universe.md | 25 +- .../cargo_aliases/cargo-bazel-lock.json | 188 +++-- .../cargo_workspace/cargo-bazel-lock.json | 106 ++- .../multi_package/cargo-bazel-lock.json | 668 ++++++++++++------ .../no_cargo_manifests/cargo-bazel-lock.json | 362 ++++++---- .../vendor_local_patching/.gitignore | 5 + .../vendor_local_patching/BUILD.bazel | 26 + .../vendor_local_patching/Cargo.lock | 71 ++ .../vendor_local_patching/Cargo.toml | 17 + .../empty_wasi/Cargo.toml | 3 + .../empty_wasi/src/lib.rs | 0 .../forked_rand_core/BUILD.bazel | 17 + .../vendor_local_patching/src/main.rs | 3 + .../vendor_local_patching/vendor/BUILD.bazel | 31 + .../vendor/cfg-if-1.0.0/BUILD.bazel | 41 ++ .../vendor_local_patching/vendor/defs.bzl | 357 ++++++++++ .../vendor/getrandom-0.2.8/BUILD.bazel | 64 ++ .../vendor/libc-0.2.140/BUILD.bazel | 81 +++ .../vendor/ppv-lite86-0.2.17/BUILD.bazel | 45 ++ .../vendor/rand-0.8.5/BUILD.bazel | 71 ++ .../vendor/rand_chacha-0.3.1/BUILD.bazel | 48 ++ .../vendor/rand_core-0.6.4/BUILD.bazel | 49 ++ .../BUILD.bazel | 28 + 25 files changed, 1889 insertions(+), 444 deletions(-) create mode 100644 examples/crate_universe/vendor_local_patching/.gitignore create mode 100644 examples/crate_universe/vendor_local_patching/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/Cargo.lock create mode 100644 examples/crate_universe/vendor_local_patching/Cargo.toml create mode 100644 examples/crate_universe/vendor_local_patching/empty_wasi/Cargo.toml create mode 100644 examples/crate_universe/vendor_local_patching/empty_wasi/src/lib.rs create mode 100644 examples/crate_universe/vendor_local_patching/forked_rand_core/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/src/main.rs create mode 100644 examples/crate_universe/vendor_local_patching/vendor/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/cfg-if-1.0.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/defs.bzl create mode 100644 examples/crate_universe/vendor_local_patching/vendor/getrandom-0.2.8/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/libc-0.2.140/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/ppv-lite86-0.2.17/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/rand-0.8.5/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/rand_chacha-0.3.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/rand_core-0.6.4/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_patching/vendor/wasi-0.11.0+wasi-snapshot-preview1/BUILD.bazel diff --git a/crate_universe/private/crates_vendor.bzl b/crate_universe/private/crates_vendor.bzl index 3cd6ed533b..f5bc26c381 100644 --- a/crate_universe/private/crates_vendor.bzl +++ b/crate_universe/private/crates_vendor.bzl @@ -333,12 +333,35 @@ directory next to where the target is defined. To run it, simply call: bazel run //3rdparty:crates_vendor ``` +### Patching + +If you need to replace crates in your third_party dependency tree with forks, the `patch` section can be used in your cargo manifest: + +```toml +[patch.crates-io] +fuse3 = { path = "forks/fuse3" } +``` + +A build file for the patched crate will still be generated under the vendor path +(such as `crates/fuse3-0.6.1/BUILD.bazel`), but `cargo vendor` will NOT download the +crate to that location, and the generated BUILD file will point to your copy. For this +to work, you need to define the following filegroups in your patch crate's BUILD.bazel: +`:srcs`, `:crate_root`, `:compile_data`, and (if the crate has a build script) +`:build_script_crate_root`. See the +[patching example](https://github.com/bazelbuild/rules_rust/tree/main/examples/crate_universe/vendor_local_patching) +for an example of what those BUILD files look like. + +This feature can also be used to avoid vendoring source code for crates that you never +actually use for the platforms you're targeting. In that case you don't need an extra +BUILD file, just crate a empty/stub Cargo.toml and `lib.rs`, and list the path to that +in your `patch` section. + ### Repinning / Updating Dependencies Repinning dependencies is controlled by both the `CARGO_BAZEL_REPIN` environment variable or the `--repin` -flag to the `crates_vendor` binary. To update dependencies, simply add the flag ro your `bazel run` invocation. +flag to the `crates_vendor` binary. To update dependencies, simply add the flag to your `bazel run` invocation. ```shell bazel run //3rdparty:crates_vendor -- --repin diff --git a/crate_universe/src/context/crate_context.rs b/crate_universe/src/context/crate_context.rs index eb1989cb44..6c14a94f71 100644 --- a/crate_universe/src/context/crate_context.rs +++ b/crate_universe/src/context/crate_context.rs @@ -735,7 +735,7 @@ fn get_attributes( // TODO: remove once added to help-docs println!("\nThere's a patch crate at '//{pkg}'."); println!("Make sure that '//{pkg}/BUILD.bazel' exposes the following filegroups:"); - println!("'crate_root', 'srcs', 'compile_data', and (if necessary) 'build_script'"); + println!("'crate_root', 'srcs', 'compile_data', and (if necessary) 'build_script_crate_root'"); let srcs = GlobOrLabels::Labels(vec![Label { repository: None, package: Some(pkg.clone()), diff --git a/docs/crate_universe.md b/docs/crate_universe.md index 29872c35ad..b228f47f21 100644 --- a/docs/crate_universe.md +++ b/docs/crate_universe.md @@ -449,12 +449,35 @@ directory next to where the target is defined. To run it, simply call: bazel run //3rdparty:crates_vendor ``` +### Patching + +If you need to replace crates in your third_party dependency tree with forks, the `patch` section can be used in your cargo manifest: + +```toml +[patch.crates-io] +fuse3 = { path = "forks/fuse3" } +``` + +A build file for the patched crate will still be generated under the vendor path +(such as `crates/fuse3-0.6.1/BUILD.bazel`), but `cargo vendor` will NOT download the +crate to that location, and the generated BUILD file will point to your copy. For this +to work, you need to define the following filegroups in your patch crate's BUILD.bazel: +`:srcs`, `:crate_root`, `:compile_data`, and (if the crate has a build script) +`:build_script_crate_root`. See the +[patching example](https://github.com/bazelbuild/rules_rust/tree/main/examples/crate_universe/vendor_local_patching) +for an example of what those BUILD files look like. + +This feature can also be used to avoid vendoring source code for crates that you never +actually use for the platforms you're targeting. In that case you don't need an extra +BUILD file, just crate a empty/stub Cargo.toml and `lib.rs`, and list the path to that +in your `patch` section. + <a id="#crates_vendor_repinning_updating_dependencies"></a> ### Repinning / Updating Dependencies Repinning dependencies is controlled by both the `CARGO_BAZEL_REPIN` environment variable or the `--repin` -flag to the `crates_vendor` binary. To update dependencies, simply add the flag ro your `bazel run` invocation. +flag to the `crates_vendor` binary. To update dependencies, simply add the flag to your `bazel run` invocation. ```shell bazel run //3rdparty:crates_vendor -- --repin diff --git a/examples/crate_universe/cargo_aliases/cargo-bazel-lock.json b/examples/crate_universe/cargo_aliases/cargo-bazel-lock.json index 0820bc999c..1dbed2728d 100644 --- a/examples/crate_universe/cargo_aliases/cargo-bazel-lock.json +++ b/examples/crate_universe/cargo_aliases/cargo-bazel-lock.json @@ -1,5 +1,5 @@ { - "checksum": "7c44e4d0f89eca382078ada851e9088bb62bc3e573c63562239d1ad090ee1ba8", + "checksum": "6562c6d2033c42a2df8a61e69370e1122ad56e7daf1e8555d34adad84cfe8add", "crates": { "aho-corasick 0.7.20": { "name": "aho-corasick", @@ -17,7 +17,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -58,7 +59,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -124,7 +126,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -177,7 +180,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -207,7 +211,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -243,7 +248,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -273,7 +279,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -364,7 +371,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -425,7 +433,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -464,7 +473,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -507,7 +517,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -572,7 +583,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -630,7 +642,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -666,7 +679,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -702,7 +716,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -741,7 +756,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -771,7 +787,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -780,7 +797,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -843,7 +861,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -852,7 +871,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -896,7 +916,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -942,7 +963,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -951,7 +973,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1005,7 +1028,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1014,7 +1038,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1068,7 +1093,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1077,7 +1103,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1137,7 +1164,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1146,7 +1174,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1206,7 +1235,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1245,7 +1275,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1281,7 +1312,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1318,7 +1350,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1327,7 +1360,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1409,7 +1443,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1418,7 +1453,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1479,7 +1515,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1488,7 +1525,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1543,7 +1581,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1552,7 +1591,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1607,7 +1647,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1669,7 +1710,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1718,7 +1760,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1765,7 +1808,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1825,7 +1869,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1855,7 +1900,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1885,7 +1931,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1894,7 +1941,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1963,7 +2011,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2004,7 +2053,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2034,7 +2084,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2064,7 +2115,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2073,7 +2125,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2136,7 +2189,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2166,7 +2220,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2203,7 +2258,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2212,7 +2268,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2285,7 +2342,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2294,7 +2352,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2338,7 +2397,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2379,7 +2439,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2388,7 +2449,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], diff --git a/examples/crate_universe/cargo_workspace/cargo-bazel-lock.json b/examples/crate_universe/cargo_workspace/cargo-bazel-lock.json index 5ac9e79cbc..98c3d0f339 100644 --- a/examples/crate_universe/cargo_workspace/cargo-bazel-lock.json +++ b/examples/crate_universe/cargo_workspace/cargo-bazel-lock.json @@ -1,5 +1,5 @@ { - "checksum": "770f32afe720168322e9747169ba78f7ad1d6915c8c7e6f9a8d1ea2a1b7cf715", + "checksum": "3511451a34b18021c80d8cee04c81f02874cfa5b657f8f1195a0197989bc6fee", "crates": { "ansi_term 0.12.1": { "name": "ansi_term", @@ -17,7 +17,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -58,7 +59,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -111,7 +113,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -147,7 +150,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -177,7 +181,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -255,7 +260,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -302,7 +308,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -311,7 +318,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -378,7 +386,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -417,7 +426,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -426,7 +436,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -494,7 +505,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -523,9 +535,12 @@ { "Library": { "crate_name": "printer", - "crate_root": "src/lib.rs", + "crate_root": "//cargo_workspace/printer:crate_root", "srcs": [ - "**/*.rs" + "//cargo_workspace/printer:srcs" + ], + "compile_data": [ + "//cargo_workspace/printer:compile_data" ] } } @@ -565,7 +580,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -639,7 +655,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -688,7 +705,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -735,7 +753,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -766,9 +785,12 @@ { "Library": { "crate_name": "rng", - "crate_root": "src/lib.rs", + "crate_root": "//cargo_workspace/rng:crate_root", "srcs": [ - "**/*.rs" + "//cargo_workspace/rng:srcs" + ], + "compile_data": [ + "//cargo_workspace/rng:compile_data" ] } } @@ -808,7 +830,8 @@ "crate_root": "lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -845,7 +868,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -875,7 +899,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -905,7 +930,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -944,7 +970,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -995,7 +1022,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1031,7 +1059,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1061,7 +1090,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1098,7 +1128,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1107,7 +1138,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1177,7 +1209,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1186,7 +1219,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1230,7 +1264,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1239,7 +1274,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], diff --git a/examples/crate_universe/multi_package/cargo-bazel-lock.json b/examples/crate_universe/multi_package/cargo-bazel-lock.json index cc75bb60bd..6bbf046e73 100644 --- a/examples/crate_universe/multi_package/cargo-bazel-lock.json +++ b/examples/crate_universe/multi_package/cargo-bazel-lock.json @@ -1,5 +1,5 @@ { - "checksum": "93a70712434055b5fc6b3aa458ee3a032c9cf8615254ea8e881120e714f7e1b2", + "checksum": "b3e2e36e176cee21df634e3c3f8d37a0a507d000f429d70cbe35dae93033490b", "crates": { "aho-corasick 0.7.20": { "name": "aho-corasick", @@ -17,7 +17,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -63,7 +64,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -72,7 +74,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -123,7 +126,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -166,7 +170,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -213,7 +218,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -272,7 +278,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -342,7 +349,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -351,7 +359,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -453,7 +462,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -492,7 +502,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -531,7 +542,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -540,7 +552,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -634,7 +647,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -778,7 +792,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -815,7 +830,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -824,7 +840,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -880,7 +897,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -910,7 +928,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -940,7 +959,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -977,7 +997,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1014,7 +1035,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1053,7 +1075,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1112,7 +1135,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1148,7 +1172,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1185,7 +1210,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1231,7 +1257,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1261,7 +1288,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1291,7 +1319,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1337,7 +1366,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1346,7 +1376,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1401,7 +1432,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1444,7 +1476,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1453,7 +1486,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1537,7 +1571,8 @@ "crate_root": "lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1608,7 +1643,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1654,7 +1690,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1700,7 +1737,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1730,7 +1768,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1771,7 +1810,8 @@ "crate_root": "lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1808,7 +1848,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1847,7 +1888,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1856,7 +1898,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1912,7 +1955,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1921,7 +1965,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1973,7 +2018,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2010,7 +2056,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2086,7 +2133,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2133,7 +2181,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2171,7 +2220,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2180,7 +2230,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2231,7 +2282,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2240,7 +2292,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2336,7 +2389,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2345,7 +2399,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2402,7 +2457,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2462,7 +2518,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2541,7 +2598,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2577,7 +2635,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2616,7 +2675,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2646,7 +2706,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2693,7 +2754,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2740,7 +2802,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2749,7 +2812,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2800,7 +2864,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2833,7 +2898,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2955,7 +3021,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3068,7 +3135,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3123,7 +3191,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3166,7 +3235,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3175,7 +3245,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3238,7 +3309,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3277,7 +3349,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3316,7 +3389,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3325,7 +3399,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3467,7 +3542,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3497,7 +3573,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3536,7 +3613,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3575,7 +3653,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3605,7 +3684,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3635,7 +3715,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3644,7 +3725,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3695,7 +3777,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3704,7 +3787,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3766,7 +3850,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3775,7 +3860,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3850,7 +3936,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3859,7 +3946,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3918,7 +4006,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3972,7 +4061,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3981,7 +4071,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4032,7 +4123,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4062,7 +4154,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4133,7 +4226,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4180,7 +4274,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4226,7 +4321,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4284,7 +4380,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4323,7 +4420,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4353,7 +4451,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4383,7 +4482,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4420,7 +4520,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4459,7 +4560,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4506,7 +4608,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4536,7 +4639,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4566,7 +4670,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4588,9 +4693,12 @@ { "Library": { "crate_name": "pkg_a", - "crate_root": "src/lib.rs", + "crate_root": "//pkg_a:crate_root", "srcs": [ - "**/*.rs" + "//pkg_a:srcs" + ], + "compile_data": [ + "//pkg_a:compile_data" ] } } @@ -4635,9 +4743,12 @@ { "Library": { "crate_name": "pkg_b", - "crate_root": "src/lib.rs", + "crate_root": "//pkg_b:crate_root", "srcs": [ - "**/*.rs" + "//pkg_b:srcs" + ], + "compile_data": [ + "//pkg_b:compile_data" ] } } @@ -4673,9 +4784,12 @@ { "Library": { "crate_name": "pkg_c", - "crate_root": "src/lib.rs", + "crate_root": "//pkg_c:crate_root", "srcs": [ - "**/*.rs" + "//pkg_c:srcs" + ], + "compile_data": [ + "//pkg_c:compile_data" ] } } @@ -4724,7 +4838,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4733,7 +4848,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4818,7 +4934,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4861,7 +4978,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4870,7 +4988,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4925,7 +5044,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4934,7 +5054,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4989,7 +5110,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5058,7 +5180,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5102,7 +5225,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5285,7 +5409,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -5294,7 +5419,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5396,7 +5522,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -5405,7 +5532,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5475,7 +5603,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -5484,7 +5613,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5563,7 +5693,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5602,7 +5733,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5641,7 +5773,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -5650,7 +5783,8 @@ "crate_root": "build/build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5694,7 +5828,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5724,7 +5859,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5763,7 +5899,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5806,7 +5943,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -5815,7 +5953,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5877,7 +6016,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -5886,7 +6026,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -5948,7 +6089,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -5957,7 +6099,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6020,7 +6163,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6063,7 +6207,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6114,7 +6259,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -6123,7 +6269,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6182,7 +6329,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6221,7 +6369,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6258,7 +6407,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -6267,7 +6417,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6327,7 +6478,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6374,7 +6526,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6427,7 +6580,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6457,7 +6611,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -6466,7 +6621,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6538,7 +6694,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6585,7 +6742,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6615,7 +6773,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -6624,7 +6783,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6758,7 +6918,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6805,7 +6966,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6860,7 +7022,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6927,7 +7090,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -6957,7 +7121,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7010,7 +7175,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7040,7 +7206,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7110,7 +7277,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7157,7 +7325,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7203,7 +7372,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7254,7 +7424,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7284,7 +7455,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -7293,7 +7465,8 @@ "crate_root": "build/main.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7337,7 +7510,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7375,7 +7549,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7405,7 +7580,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7451,7 +7627,8 @@ "crate_root": "src/untrusted.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7481,7 +7658,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7534,7 +7712,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -7543,7 +7722,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7606,7 +7786,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7636,7 +7817,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7666,7 +7848,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7696,7 +7879,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7739,7 +7923,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7776,7 +7961,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -7785,7 +7971,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7850,7 +8037,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7919,7 +8107,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -7973,7 +8162,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8022,7 +8212,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8083,7 +8274,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8092,7 +8284,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8137,7 +8330,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8204,7 +8398,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8254,7 +8449,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8293,7 +8489,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8302,7 +8499,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8362,7 +8560,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8371,7 +8570,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8450,7 +8650,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8459,7 +8660,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8503,7 +8705,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8512,7 +8715,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8556,7 +8760,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8683,7 +8888,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8744,7 +8950,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8851,7 +9058,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8860,7 +9068,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8904,7 +9113,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8913,7 +9123,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -8957,7 +9168,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -8966,7 +9178,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -9010,7 +9223,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -9019,7 +9233,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -9063,7 +9278,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -9072,7 +9288,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -9116,7 +9333,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -9125,7 +9343,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -9169,7 +9388,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -9178,7 +9398,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -9222,7 +9443,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -9260,7 +9482,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -9269,7 +9492,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], diff --git a/examples/crate_universe/no_cargo_manifests/cargo-bazel-lock.json b/examples/crate_universe/no_cargo_manifests/cargo-bazel-lock.json index 7ea46a577b..20ff16e415 100644 --- a/examples/crate_universe/no_cargo_manifests/cargo-bazel-lock.json +++ b/examples/crate_universe/no_cargo_manifests/cargo-bazel-lock.json @@ -1,5 +1,5 @@ { - "checksum": "718e9a06af15604ca61dbed459a376225bf0b592f396fbb553afcd58988f7c94", + "checksum": "7cd674e8d0db8ea30411abde67dd9b4f572a1aa240f1ef7f03a78c56aa2cdf61", "crates": { "async-trait 0.1.64": { "name": "async-trait", @@ -17,7 +17,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -26,7 +27,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -82,7 +84,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -112,7 +115,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -251,7 +255,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -315,7 +320,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -351,7 +357,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -388,7 +395,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -413,7 +421,8 @@ "crate_root": ".direct_cargo_bazel_deps.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -488,7 +497,8 @@ "crate_root": "lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -525,7 +535,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -564,7 +575,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -573,7 +585,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -629,7 +642,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -638,7 +652,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -690,7 +705,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -728,7 +744,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -737,7 +754,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -787,7 +805,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -796,7 +815,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -862,7 +882,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -941,7 +962,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -977,7 +999,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1016,7 +1039,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1063,7 +1087,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1110,7 +1135,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1140,7 +1166,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1149,7 +1176,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1200,7 +1228,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1230,7 +1259,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1345,7 +1375,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1354,7 +1385,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1417,7 +1449,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1447,7 +1480,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1477,7 +1511,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1486,7 +1521,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1537,7 +1573,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1546,7 +1583,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1603,7 +1641,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1612,7 +1651,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1666,7 +1706,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1702,7 +1743,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -1711,7 +1753,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1762,7 +1805,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1792,7 +1836,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1863,7 +1908,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1909,7 +1955,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1956,7 +2003,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -1995,7 +2043,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2025,7 +2074,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2074,7 +2124,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2083,7 +2134,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2154,7 +2206,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2191,7 +2244,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2230,7 +2284,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2277,7 +2332,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2307,7 +2363,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2337,7 +2394,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2346,7 +2404,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2401,7 +2460,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2410,7 +2470,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2465,7 +2526,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2504,7 +2566,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2534,7 +2597,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2564,7 +2628,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2573,7 +2638,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2624,7 +2690,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2633,7 +2700,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2697,7 +2765,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2748,7 +2817,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2787,7 +2857,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2826,7 +2897,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2835,7 +2907,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2895,7 +2968,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2925,7 +2999,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -2978,7 +3053,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -2987,7 +3063,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3059,7 +3136,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3089,7 +3167,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3132,7 +3211,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -3141,7 +3221,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3293,7 +3374,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3340,7 +3422,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3407,7 +3490,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3496,7 +3580,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3590,7 +3675,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3620,7 +3706,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3650,7 +3737,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3720,7 +3808,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3767,7 +3856,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3821,7 +3911,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3875,7 +3966,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3950,7 +4042,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -3980,7 +4073,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4010,7 +4104,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4019,7 +4114,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4063,7 +4159,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4106,7 +4203,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4143,7 +4241,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4152,7 +4251,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4221,7 +4321,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4230,7 +4331,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4274,7 +4376,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4283,7 +4386,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4327,7 +4431,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4389,7 +4494,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4496,7 +4602,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4505,7 +4612,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4549,7 +4657,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4558,7 +4667,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4602,7 +4712,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4611,7 +4722,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4655,7 +4767,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4664,7 +4777,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4708,7 +4822,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4717,7 +4832,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4761,7 +4877,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4770,7 +4887,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], @@ -4814,7 +4932,8 @@ "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } }, { @@ -4823,7 +4942,8 @@ "crate_root": "build.rs", "srcs": [ "**/*.rs" - ] + ], + "compile_data": null } } ], diff --git a/examples/crate_universe/vendor_local_patching/.gitignore b/examples/crate_universe/vendor_local_patching/.gitignore new file mode 100644 index 0000000000..dea07080bb --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything but the `BUILD` files within the vendored directories +vendor/*/* +!vendor/*/BUILD.bazel +forked_rand_core/* +!forked_rand_core/BUILD.bazel diff --git a/examples/crate_universe/vendor_local_patching/BUILD.bazel b/examples/crate_universe/vendor_local_patching/BUILD.bazel new file mode 100644 index 0000000000..e17b7860ce --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/BUILD.bazel @@ -0,0 +1,26 @@ +load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_vendor") +load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test") + +crates_vendor( + name = "vendor", + cargo_lockfile = ":Cargo.lock", + manifests = [":Cargo.toml"], + mode = "local", + # We don't support wasi + supported_platform_triples = [ + "x86_64-unknown-linux-gnu", + "aarch64-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-pc-windows-msvc", + "x86_64-fuchsia", + "aarch64-fuchsia", + ], + vendor_path = "vendor", +) + +rust_binary( + name = "bin", + srcs = ["src/main.rs"], + deps = ["//vendor_local_patching/vendor:rand"], + edition = "2021", +) diff --git a/examples/crate_universe/vendor_local_patching/Cargo.lock b/examples/crate_universe/vendor_local_patching/Cargo.lock new file mode 100644 index 0000000000..7c74a3455f --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/Cargo.lock @@ -0,0 +1,71 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "getrandom" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "libc" +version = "0.2.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" + +[[package]] +name = "my_third_party" +version = "0.1.0" +dependencies = [ + "rand", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +dependencies = [ + "getrandom", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" diff --git a/examples/crate_universe/vendor_local_patching/Cargo.toml b/examples/crate_universe/vendor_local_patching/Cargo.toml new file mode 100644 index 0000000000..d4a868e036 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "my_third_party" +version = "0.1.0" + +[dependencies] +rand = "0.8.5" + +[patch.crates-io] +# We need to make sure that forked_rand_core/BUILD.bazel exposes the correct +# filegroups so that the generated BUILD file in the vendor dir can point to them. +rand_core = { path = "forked_rand_core" } + +# Since we know this crate is never used, we don't have to bother creating a BUILD +# file for our empty stub crate we're using to patch it out +wasi = { path = "empty_wasi" } + +# TODO: find a dep with a build script to patch to show that that works. diff --git a/examples/crate_universe/vendor_local_patching/empty_wasi/Cargo.toml b/examples/crate_universe/vendor_local_patching/empty_wasi/Cargo.toml new file mode 100644 index 0000000000..f77ae02a6c --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/empty_wasi/Cargo.toml @@ -0,0 +1,3 @@ +[package] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" diff --git a/examples/crate_universe/vendor_local_patching/empty_wasi/src/lib.rs b/examples/crate_universe/vendor_local_patching/empty_wasi/src/lib.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/crate_universe/vendor_local_patching/forked_rand_core/BUILD.bazel b/examples/crate_universe/vendor_local_patching/forked_rand_core/BUILD.bazel new file mode 100644 index 0000000000..aeea58cf42 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/forked_rand_core/BUILD.bazel @@ -0,0 +1,17 @@ +filegroup( + name = "crate_root", + srcs = ["src/lib.rs"], + visibility = ["//vendor_local_patching/vendor:__subpackages__"], +) + +filegroup( + name = "srcs", + srcs = glob(["**/*.rs"]), + visibility = ["//vendor_local_patching/vendor:__subpackages__"], +) + +filegroup( + name = "compile_data", + srcs = [], + visibility = ["//vendor_local_patching/vendor:__subpackages__"], +) diff --git a/examples/crate_universe/vendor_local_patching/src/main.rs b/examples/crate_universe/vendor_local_patching/src/main.rs new file mode 100644 index 0000000000..a1faf7fafd --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("random number: {}", rand::random::()); +} diff --git a/examples/crate_universe/vendor_local_patching/vendor/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/BUILD.bazel new file mode 100644 index 0000000000..ca475f893b --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/BUILD.bazel @@ -0,0 +1,31 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +exports_files( + [ + "cargo-bazel.json", + "defs.bzl", + ] + glob(["*.bazel"]), +) + +filegroup( + name = "srcs", + srcs = glob([ + "*.bazel", + "*.bzl", + ]), +) + +# Workspace Member Dependencies +alias( + name = "rand", + actual = "//vendor_local_patching/vendor/rand-0.8.5:rand", + tags = ["manual"], +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/cfg-if-1.0.0/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/cfg-if-1.0.0/BUILD.bazel new file mode 100644 index 0000000000..bdfa2768c4 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/cfg-if-1.0.0/BUILD.bazel @@ -0,0 +1,41 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "cfg_if", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=cfg-if", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.0", +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/defs.bzl b/examples/crate_universe/vendor_local_patching/vendor/defs.bzl new file mode 100644 index 0000000000..ffb074b506 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/defs.bzl @@ -0,0 +1,357 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### +""" +# `crates_repository` API + +- [aliases](#aliases) +- [crate_deps](#crate_deps) +- [all_crate_deps](#all_crate_deps) +- [crate_repositories](#crate_repositories) + +""" + +load("@bazel_skylib//lib:selects.bzl", "selects") + +############################################################################### +# MACROS API +############################################################################### + +# An identifier that represent common dependencies (unconditional). +_COMMON_CONDITION = "" + +def _flatten_dependency_maps(all_dependency_maps): + """Flatten a list of dependency maps into one dictionary. + + Dependency maps have the following structure: + + ```python + DEPENDENCIES_MAP = { + # The first key in the map is a Bazel package + # name of the workspace this file is defined in. + "workspace_member_package": { + + # Not all dependnecies are supported for all platforms. + # the condition key is the condition required to be true + # on the host platform. + "condition": { + + # An alias to a crate target. # The label of the crate target the + # Aliases are only crate names. # package name refers to. + "package_name": "@full//:label", + } + } + } + ``` + + Args: + all_dependency_maps (list): A list of dicts as described above + + Returns: + dict: A dictionary as described above + """ + dependencies = {} + + for workspace_deps_map in all_dependency_maps: + for pkg_name, conditional_deps_map in workspace_deps_map.items(): + if pkg_name not in dependencies: + non_frozen_map = dict() + for key, values in conditional_deps_map.items(): + non_frozen_map.update({key: dict(values.items())}) + dependencies.setdefault(pkg_name, non_frozen_map) + continue + + for condition, deps_map in conditional_deps_map.items(): + # If the condition has not been recorded, do so and continue + if condition not in dependencies[pkg_name]: + dependencies[pkg_name].setdefault(condition, dict(deps_map.items())) + continue + + # Alert on any miss-matched dependencies + inconsistent_entries = [] + for crate_name, crate_label in deps_map.items(): + existing = dependencies[pkg_name][condition].get(crate_name) + if existing and existing != crate_label: + inconsistent_entries.append((crate_name, existing, crate_label)) + dependencies[pkg_name][condition].update({crate_name: crate_label}) + + return dependencies + +def crate_deps(deps, package_name = None): + """Finds the fully qualified label of the requested crates for the package where this macro is called. + + Args: + deps (list): The desired list of crate targets. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()`. + + Returns: + list: A list of labels to generated rust targets (str) + """ + + if not deps: + return [] + + if package_name == None: + package_name = native.package_name() + + # Join both sets of dependencies + dependencies = _flatten_dependency_maps([ + _NORMAL_DEPENDENCIES, + _NORMAL_DEV_DEPENDENCIES, + _PROC_MACRO_DEPENDENCIES, + _PROC_MACRO_DEV_DEPENDENCIES, + _BUILD_DEPENDENCIES, + _BUILD_PROC_MACRO_DEPENDENCIES, + ]).pop(package_name, {}) + + # Combine all conditional packages so we can easily index over a flat list + # TODO: Perhaps this should actually return select statements and maintain + # the conditionals of the dependencies + flat_deps = {} + for deps_set in dependencies.values(): + for crate_name, crate_label in deps_set.items(): + flat_deps.update({crate_name: crate_label}) + + missing_crates = [] + crate_targets = [] + for crate_target in deps: + if crate_target not in flat_deps: + missing_crates.append(crate_target) + else: + crate_targets.append(flat_deps[crate_target]) + + if missing_crates: + fail("Could not find crates `{}` among dependencies of `{}`. Available dependencies were `{}`".format( + missing_crates, + package_name, + dependencies, + )) + + return crate_targets + +def all_crate_deps( + normal = False, + normal_dev = False, + proc_macro = False, + proc_macro_dev = False, + build = False, + build_proc_macro = False, + package_name = None): + """Finds the fully qualified label of all requested direct crate dependencies \ + for the package where this macro is called. + + If no parameters are set, all normal dependencies are returned. Setting any one flag will + otherwise impact the contents of the returned list. + + Args: + normal (bool, optional): If True, normal dependencies are included in the + output list. + normal_dev (bool, optional): If True, normal dev dependencies will be + included in the output list.. + proc_macro (bool, optional): If True, proc_macro dependencies are included + in the output list. + proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are + included in the output list. + build (bool, optional): If True, build dependencies are included + in the output list. + build_proc_macro (bool, optional): If True, build proc_macro dependencies are + included in the output list. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()` when unset. + + Returns: + list: A list of labels to generated rust targets (str) + """ + + if package_name == None: + package_name = native.package_name() + + # Determine the relevant maps to use + all_dependency_maps = [] + if normal: + all_dependency_maps.append(_NORMAL_DEPENDENCIES) + if normal_dev: + all_dependency_maps.append(_NORMAL_DEV_DEPENDENCIES) + if proc_macro: + all_dependency_maps.append(_PROC_MACRO_DEPENDENCIES) + if proc_macro_dev: + all_dependency_maps.append(_PROC_MACRO_DEV_DEPENDENCIES) + if build: + all_dependency_maps.append(_BUILD_DEPENDENCIES) + if build_proc_macro: + all_dependency_maps.append(_BUILD_PROC_MACRO_DEPENDENCIES) + + # Default to always using normal dependencies + if not all_dependency_maps: + all_dependency_maps.append(_NORMAL_DEPENDENCIES) + + dependencies = _flatten_dependency_maps(all_dependency_maps).pop(package_name, None) + + if not dependencies: + if dependencies == None: + fail("Tried to get all_crate_deps for package " + package_name + " but that package had no Cargo.toml file") + else: + return [] + + crate_deps = list(dependencies.pop(_COMMON_CONDITION, {}).values()) + for condition, deps in dependencies.items(): + crate_deps += selects.with_or({_CONDITIONS[condition]: deps.values()}) + + return crate_deps + +def aliases( + normal = False, + normal_dev = False, + proc_macro = False, + proc_macro_dev = False, + build = False, + build_proc_macro = False, + package_name = None): + """Produces a map of Crate alias names to their original label + + If no dependency kinds are specified, `normal` and `proc_macro` are used by default. + Setting any one flag will otherwise determine the contents of the returned dict. + + Args: + normal (bool, optional): If True, normal dependencies are included in the + output list. + normal_dev (bool, optional): If True, normal dev dependencies will be + included in the output list.. + proc_macro (bool, optional): If True, proc_macro dependencies are included + in the output list. + proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are + included in the output list. + build (bool, optional): If True, build dependencies are included + in the output list. + build_proc_macro (bool, optional): If True, build proc_macro dependencies are + included in the output list. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()` when unset. + + Returns: + dict: The aliases of all associated packages + """ + if package_name == None: + package_name = native.package_name() + + # Determine the relevant maps to use + all_aliases_maps = [] + if normal: + all_aliases_maps.append(_NORMAL_ALIASES) + if normal_dev: + all_aliases_maps.append(_NORMAL_DEV_ALIASES) + if proc_macro: + all_aliases_maps.append(_PROC_MACRO_ALIASES) + if proc_macro_dev: + all_aliases_maps.append(_PROC_MACRO_DEV_ALIASES) + if build: + all_aliases_maps.append(_BUILD_ALIASES) + if build_proc_macro: + all_aliases_maps.append(_BUILD_PROC_MACRO_ALIASES) + + # Default to always using normal aliases + if not all_aliases_maps: + all_aliases_maps.append(_NORMAL_ALIASES) + all_aliases_maps.append(_PROC_MACRO_ALIASES) + + aliases = _flatten_dependency_maps(all_aliases_maps).pop(package_name, None) + + if not aliases: + return dict() + + common_items = aliases.pop(_COMMON_CONDITION, {}).items() + + # If there are only common items in the dictionary, immediately return them + if not len(aliases.keys()) == 1: + return dict(common_items) + + # Build a single select statement where each conditional has accounted for the + # common set of aliases. + crate_aliases = {"//conditions:default": common_items} + for condition, deps in aliases.items(): + condition_triples = _CONDITIONS[condition] + if condition_triples in crate_aliases: + crate_aliases[condition_triples].update(deps) + else: + crate_aliases.update({_CONDITIONS[condition]: dict(deps.items() + common_items)}) + + return selects.with_or(crate_aliases) + +############################################################################### +# WORKSPACE MEMBER DEPS AND ALIASES +############################################################################### + +_NORMAL_DEPENDENCIES = { + "vendor_local_patching": { + _COMMON_CONDITION: { + "rand": "//vendor_local_patching/vendor/rand-0.8.5:rand", + }, + }, +} + +_NORMAL_ALIASES = { + "vendor_local_patching": { + _COMMON_CONDITION: { + }, + }, +} + +_NORMAL_DEV_DEPENDENCIES = { + "vendor_local_patching": { + }, +} + +_NORMAL_DEV_ALIASES = { + "vendor_local_patching": { + }, +} + +_PROC_MACRO_DEPENDENCIES = { + "vendor_local_patching": { + }, +} + +_PROC_MACRO_ALIASES = { + "vendor_local_patching": { + }, +} + +_PROC_MACRO_DEV_DEPENDENCIES = { + "vendor_local_patching": { + }, +} + +_PROC_MACRO_DEV_ALIASES = { + "vendor_local_patching": { + }, +} + +_BUILD_DEPENDENCIES = { + "vendor_local_patching": { + }, +} + +_BUILD_ALIASES = { + "vendor_local_patching": { + }, +} + +_BUILD_PROC_MACRO_DEPENDENCIES = { + "vendor_local_patching": { + }, +} + +_BUILD_PROC_MACRO_ALIASES = { + "vendor_local_patching": { + }, +} + +_CONDITIONS = { + "cfg(target_os = \"wasi\")": [], + "cfg(unix)": ["aarch64-fuchsia", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-fuchsia", "x86_64-unknown-linux-gnu"], +} diff --git a/examples/crate_universe/vendor_local_patching/vendor/getrandom-0.2.8/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/getrandom-0.2.8/BUILD.bazel new file mode 100644 index 0000000000..9474eba99a --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/getrandom-0.2.8/BUILD.bazel @@ -0,0 +1,64 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "getrandom", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=getrandom", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.8", + deps = [ + "//vendor_local_patching/vendor/cfg-if-1.0.0:cfg_if", + ] + select({ + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/libc-0.2.140/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/libc-0.2.140/BUILD.bazel new file mode 100644 index 0000000000..3354d15071 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/libc-0.2.140/BUILD.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "libc", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=libc", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.140", + deps = [ + "//vendor_local_patching/vendor/libc-0.2.140:build_script_build", + ], +) + +cargo_build_script( + name = "libc_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2015", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=libc", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.140", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "libc_build_script", + tags = ["manual"], +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/ppv-lite86-0.2.17/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/ppv-lite86-0.2.17/BUILD.bazel new file mode 100644 index 0000000000..d753ed33a2 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/ppv-lite86-0.2.17/BUILD.bazel @@ -0,0 +1,45 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "ppv_lite86", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "simd", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=ppv-lite86", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.17", +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/rand-0.8.5/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/rand-0.8.5/BUILD.bazel new file mode 100644 index 0000000000..b8c018758d --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/rand-0.8.5/BUILD.bazel @@ -0,0 +1,71 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "default", + "getrandom", + "libc", + "rand_chacha", + "std", + "std_rng", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rand", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.8.5", + deps = [ + "//vendor_local_patching/vendor/rand_chacha-0.3.1:rand_chacha", + "//vendor_local_patching/vendor/rand_core-0.6.4:rand_core", + ] + select({ + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "//vendor_local_patching/vendor/libc-0.2.140:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/rand_chacha-0.3.1/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/rand_chacha-0.3.1/BUILD.bazel new file mode 100644 index 0000000000..ec1e108ba3 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/rand_chacha-0.3.1/BUILD.bazel @@ -0,0 +1,48 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand_chacha", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rand_chacha", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.1", + deps = [ + "//vendor_local_patching/vendor/ppv-lite86-0.2.17:ppv_lite86", + "//vendor_local_patching/vendor/rand_core-0.6.4:rand_core", + ], +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/rand_core-0.6.4/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/rand_core-0.6.4/BUILD.bazel new file mode 100644 index 0000000000..766828ad72 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/rand_core-0.6.4/BUILD.bazel @@ -0,0 +1,49 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand_core", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "getrandom", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rand_core", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.6.4", + deps = [ + "//vendor_local_patching/vendor/getrandom-0.2.8:getrandom", + ], +) diff --git a/examples/crate_universe/vendor_local_patching/vendor/wasi-0.11.0+wasi-snapshot-preview1/BUILD.bazel b/examples/crate_universe/vendor_local_patching/vendor/wasi-0.11.0+wasi-snapshot-preview1/BUILD.bazel new file mode 100644 index 0000000000..f65f1a70d1 --- /dev/null +++ b/examples/crate_universe/vendor_local_patching/vendor/wasi-0.11.0+wasi-snapshot-preview1/BUILD.bazel @@ -0,0 +1,28 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//vendor_local_patching:vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +rust_library( + name = "wasi", + srcs = ["//vendor_local_patching/empty_wasi:srcs"], + compile_data = ["//vendor_local_patching/empty_wasi:compile_data"], + crate_root = "//vendor_local_patching/empty_wasi:crate_root", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=wasi", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.11.0+wasi-snapshot-preview1", +)