Improve crate_universe debug logging for `cargo tree` parsing (#2854)
It's much easier to understand what's going on if I can see a standard
`cargo tree` output.
diff --git a/crate_universe/src/cli.rs b/crate_universe/src/cli.rs
index 945c6d8..9172c97 100644
--- a/crate_universe/src/cli.rs
+++ b/crate_universe/src/cli.rs
@@ -86,7 +86,7 @@
}
/// Initialize logging for one of the cli options.
-pub fn init_logging(name: &str) {
+pub fn init_logging(name: &str, verbose: bool) {
if !EXPECTED_LOGGER_NAMES.contains(&name) {
panic!(
"Unexpected logger name {}, use of one of {:?}",
@@ -98,11 +98,7 @@
let subscriber = FmtSubscriber::builder()
// all spans/events with a level higher than TRACE (e.g, debug, info, warn, etc.)
// will be written to stdout.
- .with_max_level(
- std::env::var("CARGO_BAZEL_DEBUG")
- .map(|_| Level::DEBUG)
- .unwrap_or(Level::INFO),
- )
+ .with_max_level(if verbose { Level::DEBUG } else { Level::INFO })
.event_format(LoggingFormatEvent::new(name))
// completes the builder.
.finish();
diff --git a/crate_universe/src/main.rs b/crate_universe/src/main.rs
index 6e6387f..e1ab0c9 100644
--- a/crate_universe/src/main.rs
+++ b/crate_universe/src/main.rs
@@ -6,21 +6,23 @@
// Parse arguments
let opt = cli::parse_args();
+ let verbose_logging = std::env::var("CARGO_BAZEL_DEBUG").is_ok();
+
match opt {
cli::Options::Generate(opt) => {
- cli::init_logging("Generate");
+ cli::init_logging("Generate", verbose_logging);
cli::generate(opt)
}
cli::Options::Splice(opt) => {
- cli::init_logging("Splice");
+ cli::init_logging("Splice", verbose_logging);
cli::splice(opt)
}
cli::Options::Query(opt) => {
- cli::init_logging("Query");
+ cli::init_logging("Query", verbose_logging);
cli::query(opt)
}
cli::Options::Vendor(opt) => {
- cli::init_logging("Vendor");
+ cli::init_logging("Vendor", verbose_logging);
cli::vendor(opt)
}
}
diff --git a/crate_universe/src/metadata/cargo_tree_resolver.rs b/crate_universe/src/metadata/cargo_tree_resolver.rs
index 45a4c07..04257a5 100644
--- a/crate_universe/src/metadata/cargo_tree_resolver.rs
+++ b/crate_universe/src/metadata/cargo_tree_resolver.rs
@@ -61,6 +61,76 @@
Self { cargo_bin }
}
+ /// Execute `cargo tree` for each target triple and return the stdout
+ /// streams containing structured output.
+ fn execute_cargo_tree(
+ &self,
+ manifest_path: &Path,
+ target_triples: &BTreeSet<TargetTriple>,
+ ) -> Result<BTreeMap<TargetTriple, Vec<u8>>> {
+ debug!("Spawning processes for {:?}", target_triples);
+ let mut target_triple_to_child = BTreeMap::new();
+
+ for target_triple in target_triples {
+ // We use `cargo tree` here because `cargo metadata` doesn't report
+ // back target-specific features (enabled with `resolver = "2"`).
+ // This is unfortunately a bit of a hack. See:
+ // - https://github.com/rust-lang/cargo/issues/9863
+ // - https://github.com/bazelbuild/rules_rust/issues/1662
+ let output = self
+ .cargo_bin
+ .command()?
+ .current_dir(manifest_path.parent().expect("All manifests should have a valid parent."))
+ .arg("tree")
+ .arg("--manifest-path")
+ .arg(manifest_path)
+ .arg("--edges")
+ .arg("normal,build,dev")
+ .arg("--prefix=indent")
+ // https://doc.rust-lang.org/cargo/commands/cargo-tree.html#tree-formatting-options
+ .arg("--format=;{p};{f};")
+ .arg("--color=never")
+ .arg("--charset=ascii")
+ .arg("--workspace")
+ .arg("--target")
+ .arg(target_triple.to_cargo())
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .with_context(|| {
+ format!(
+ "Error spawning cargo in child process to compute features for target '{}', manifest path '{}'",
+ target_triple,
+ manifest_path.display()
+ )
+ })?;
+ target_triple_to_child.insert(target_triple.clone(), output);
+ }
+
+ // A collection of all stdout logs from each process
+ let mut stdouts: BTreeMap<TargetTriple, Vec<u8>> = BTreeMap::new();
+
+ for (target_triple, child) in target_triple_to_child.into_iter() {
+ let output = child
+ .wait_with_output()
+ .with_context(|| {
+ format!(
+ "Error running cargo in child process to compute features for target '{}', manifest path '{}'",
+ target_triple,
+ manifest_path.display()
+ )
+ })?;
+ if !output.status.success() {
+ eprintln!("{}", String::from_utf8_lossy(&output.stdout));
+ eprintln!("{}", String::from_utf8_lossy(&output.stderr));
+ bail!(format!("Failed to run cargo tree: {}", output.status))
+ }
+ stdouts.insert(target_triple, output.stdout);
+ }
+
+ Ok(stdouts)
+ }
+
/// Computes the set of enabled features for each target triplet for each crate.
#[tracing::instrument(name = "TreeResolver::generate", skip_all)]
pub(crate) fn generate(
@@ -73,70 +143,32 @@
pristine_manifest_path.display()
);
- let (manifest_path_with_transitive_proc_macros, tempdir) = self
- .copy_project_with_explicit_deps_on_all_transitive_proc_macros(pristine_manifest_path)
+ let tempdir = tempfile::tempdir().context("Failed to make tempdir")?;
+
+ let manifest_path_with_transitive_proc_macros = self
+ .copy_project_with_explicit_deps_on_all_transitive_proc_macros(
+ pristine_manifest_path,
+ &tempdir.path().join("normal"),
+ )
.context("Failed to copy project with proc macro deps made direct")?;
- let mut target_triple_to_child = BTreeMap::new();
- debug!("Spawning processes for {:?}", target_triples);
- for target_triple in target_triples {
- // We use `cargo tree` here because `cargo metadata` doesn't report
- // back target-specific features (enabled with `resolver = "2"`).
- // This is unfortunately a bit of a hack. See:
- // - https://github.com/rust-lang/cargo/issues/9863
- // - https://github.com/bazelbuild/rules_rust/issues/1662
- let output = self
- .cargo_bin
- .command()?
- .current_dir(tempdir.path())
- .arg("tree")
- .arg("--manifest-path")
- .arg(&manifest_path_with_transitive_proc_macros)
- .arg("--edges")
- .arg("normal,build,dev")
- .arg("--prefix=depth")
- // https://doc.rust-lang.org/cargo/commands/cargo-tree.html#tree-formatting-options
- .arg("--format=|{p}|{f}|")
- .arg("--color=never")
- .arg("--workspace")
- .arg("--target")
- .arg(target_triple.to_cargo())
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .with_context(|| {
- format!(
- "Error spawning cargo in child process to compute features for target '{}', manifest path '{}'",
- target_triple,
- manifest_path_with_transitive_proc_macros.display()
- )
- })?;
- target_triple_to_child.insert(target_triple, output);
- }
+ let deps_tree_streams =
+ self.execute_cargo_tree(&manifest_path_with_transitive_proc_macros, target_triples)?;
+
let mut metadata: BTreeMap<CrateId, BTreeMap<TargetTriple, CargoTreeEntry>> =
BTreeMap::new();
- for (target_triple, child) in target_triple_to_child.into_iter() {
- let output = child
- .wait_with_output()
- .with_context(|| {
- format!(
- "Error running cargo in child process to compute features for target '{}', manifest path '{}'",
- target_triple,
- manifest_path_with_transitive_proc_macros.display()
- )
- })?;
- if !output.status.success() {
- eprintln!("{}", String::from_utf8_lossy(&output.stdout));
- eprintln!("{}", String::from_utf8_lossy(&output.stderr));
- bail!(format!("Failed to run cargo tree: {}", output.status))
- }
- debug!("Process complete for {}", target_triple);
- for (crate_id, tree_data) in
- parse_features_from_cargo_tree_output(output.stdout.lines())?
- {
+
+ for (target_triple, stdout) in deps_tree_streams.into_iter() {
+ debug!(
+ "Parsing `cargo tree --target {}` output:\n```\n{}\n```",
+ target_triple,
+ String::from_utf8_lossy(&stdout),
+ );
+
+ for (crate_id, tree_data) in parse_features_from_cargo_tree_output(stdout.lines())? {
debug!(
- "\tFor {}\n\t\tfeatures: {:?}\n\t\tdeps: {:?}",
- crate_id, tree_data.features, tree_data.deps
+ "\tFor {} ({})\n\t\tfeatures: {:?}\n\t\tdeps: {:?}",
+ crate_id, target_triple, tree_data.features, tree_data.deps
);
metadata
.entry(crate_id.clone())
@@ -144,6 +176,8 @@
.insert(target_triple.clone(), tree_data);
}
}
+
+ // Collect all metadata into a mapping of crate to it's metadata per target.
let mut result = TreeResolverMetadata::new();
for (crate_id, tree_data) in metadata.into_iter() {
let common = CargoTreeEntry {
@@ -216,14 +250,18 @@
fn copy_project_with_explicit_deps_on_all_transitive_proc_macros(
&self,
pristine_manifest_path: &Path,
- ) -> Result<(PathBuf, tempfile::TempDir)> {
+ output_dir: &Path,
+ ) -> Result<PathBuf> {
+ if !output_dir.exists() {
+ std::fs::create_dir_all(output_dir)?;
+ }
+
let pristine_root = pristine_manifest_path.parent().unwrap();
- let working_directory = tempfile::tempdir().context("Failed to make tempdir")?;
for file in std::fs::read_dir(pristine_root).context("Failed to read dir")? {
let source_path = file?.path();
let file_name = source_path.file_name().unwrap();
if file_name != "Cargo.toml" && file_name != "Cargo.lock" {
- let destination = working_directory.path().join(file_name);
+ let destination = output_dir.join(file_name);
symlink(&source_path, &destination).with_context(|| {
format!(
"Failed to create symlink {:?} pointing at {:?}",
@@ -234,13 +272,12 @@
}
std::fs::copy(
pristine_root.join("Cargo.lock"),
- working_directory.path().join("Cargo.lock"),
+ output_dir.join("Cargo.lock"),
)
.with_context(|| {
format!(
"Failed to copy Cargo.lock from {:?} to {:?}",
- pristine_root,
- working_directory.path()
+ pristine_root, output_dir
)
})?;
@@ -321,9 +358,9 @@
);
*count += 1;
}
- let manifest_path_with_transitive_proc_macros = working_directory.path().join("Cargo.toml");
+ let manifest_path_with_transitive_proc_macros = output_dir.join("Cargo.toml");
crate::splicing::write_manifest(&manifest_path_with_transitive_proc_macros, &manifest)?;
- Ok((manifest_path_with_transitive_proc_macros, working_directory))
+ Ok(manifest_path_with_transitive_proc_macros)
}
}
@@ -478,6 +515,7 @@
{
let mut tree_data = BTreeMap::<CrateId, CargoTreeEntry>::new();
let mut parents: Vec<CrateId> = Vec::new();
+
for line in lines {
let line = line?;
let line = line.as_ref();
@@ -485,13 +523,21 @@
continue;
}
- let parts = line.split('|').collect::<Vec<_>>();
+ let parts = line.split(';').collect::<Vec<_>>();
if parts.len() != 4 {
+ // The only time a line will not cleanly contain 4 parts
+ // is when there's a build or dev dependencies divider. The
+ // depth of this indicator will match the package it's
+ // associated with and can be easily skipped.
+ if line.ends_with("[build-dependencies]") || line.ends_with("[dev-dependencies]") {
+ continue;
+ }
bail!("Unexpected line '{}'", line);
}
- // We expect the crate id (parts[1]) to be either
- // "<crate name> v<crate version>" or
+ // We expect the crate id (parts[1]) to be one of
+ // "<crate name> v<crate version>"
// "<crate name> v<crate version> (<path>)"
+ // "<crate name> v<crate version> (proc-macro)"
// "<crate name> v<crate version> (proc-macro) (<path>)"
// https://github.com/rust-lang/cargo/blob/19f952f160d4f750d1e12fad2bf45e995719673d/src/cargo/ops/tree/mod.rs#L281
let crate_id_parts = parts[1].split(' ').collect::<Vec<_>>();
@@ -510,10 +556,12 @@
let version = Version::parse(version_str).context("Failed to parse version")?;
let crate_id = CrateId::new(crate_id_parts[0].to_owned(), version);
- // Update bookkeeping for dependency tracking.
- let depth = parts[0]
- .parse::<usize>()
- .with_context(|| format!("Unexpected numeric value from cargo tree: {:?}", parts))?;
+ // Update bookkeeping for dependency tracking. Note that the `cargo tree --prefix=indent`
+ // output is expected to have 4 characters per section. We only care about depth but cannot
+ // use `--prefix=depth` because it does not show the `[build-dependencies]` section which we
+ // need to identify when build dependencies start.
+ let depth = parts[0].chars().count() / 4;
+
if (depth + 1) <= parents.len() {
// Drain parents until we get down to the right depth
let range = parents.len() - (depth + 1);
@@ -540,10 +588,19 @@
parents.push(crate_id.clone());
}
+ let mut features = if parts[2].is_empty() {
+ BTreeSet::new()
+ } else {
+ parts[2].split(',').map(str::to_owned).collect()
+ };
+
// Attribute any dependency that is not the root to it's parent.
if depth > 0 {
- // Access the last item in the list of parents.
+ // Access the last item in the list of parents and insert the current
+ // crate as a dependency to it.
if let Some(parent) = parents.iter().rev().nth(1) {
+ // Dependency data is only tracked for direct consumers of build dependencies
+ // since they're known to be wrong cross-platform.
tree_data
.entry(parent.clone())
.or_default()
@@ -552,11 +609,6 @@
}
}
- let mut features = if parts[2].is_empty() {
- BTreeSet::new()
- } else {
- parts[2].split(',').map(str::to_owned).collect()
- };
tree_data
.entry(crate_id)
.or_default()
@@ -649,7 +701,7 @@
}
#[test]
- fn parse_features_from_cargo_tree_output_prefix_none() {
+ fn parse_features_from_cargo_tree_output_test() {
let autocfg_id = CrateId {
name: "autocfg".to_owned(),
version: Version::new(1, 2, 0),
@@ -711,54 +763,34 @@
version: Version::new(1, 0, 12),
};
- // |tree-data v0.1.0 (/rules_rust/crate_universe/test_data/metadata/tree_data)||
- // ├── |chrono v0.4.24|clock,default,iana-time-zone,js-sys,oldtime,std,time,wasm-bindgen,wasmbind,winapi|
- // │ ├── |iana-time-zone v0.1.60|fallback|
- // │ │ └── |core-foundation-sys v0.8.6|default,link|
- // │ ├── |num-integer v0.1.46||
- // │ │ └── |num-traits v0.2.18|i128|
- // │ │ [build-dependencies]
- // │ │ └── |autocfg v1.2.0||
- // │ ├── |num-traits v0.2.18|i128| (*)
- // │ └── |time v0.1.45||
- // │ └── |libc v0.2.153|default,std|
- // ├── |cpufeatures v0.2.7||
- // │ └── |libc v0.2.153|default,std|
- // └── |serde_derive v1.0.152 (proc-macro)|default|
- // ├── |proc-macro2 v1.0.81|default,proc-macro|
- // │ └── |unicode-ident v1.0.12||
- // ├── |quote v1.0.36|default,proc-macro|
- // │ └── |proc-macro2 v1.0.81|default,proc-macro| (*)
- // └── |syn v1.0.109|clone-impls,default,derive,parsing,printing,proc-macro,quote|
- // ├── |proc-macro2 v1.0.81|default,proc-macro| (*)
- // ├── |quote v1.0.36|default,proc-macro| (*)
- // └── |unicode-ident v1.0.12||
let output = parse_features_from_cargo_tree_output(
- vec![
- Ok::<&str, std::io::Error>(""), // Blank lines are ignored.
- Ok("0|tree-data v0.1.0 (/rules_rust/crate_universe/test_data/metadata/tree_data)||"),
- Ok("1|chrono v0.4.24|clock,default,iana-time-zone,js-sys,oldtime,std,time,wasm-bindgen,wasmbind,winapi|"),
- Ok("2|iana-time-zone v0.1.60|fallback|"),
- Ok("3|core-foundation-sys v0.8.6|default,link|"),
- Ok("2|num-integer v0.1.46||"),
- Ok("3|num-traits v0.2.18|i128|"),
- Ok("4|autocfg v1.2.0||"),
- Ok("2|num-traits v0.2.18|i128| (*)"),
- Ok("2|time v0.1.45||"),
- Ok("3|libc v0.2.153|default,std|"),
- Ok("1|cpufeatures v0.2.7||"),
- Ok("2|libc v0.2.153|default,std|"),
- Ok("1|serde_derive v1.0.152 (proc-macro)|default|"),
- Ok("2|proc-macro2 v1.0.81|default,proc-macro|"),
- Ok("3|unicode-ident v1.0.12||"),
- Ok("2|quote v1.0.36|default,proc-macro|"),
- Ok("3|proc-macro2 v1.0.81|default,proc-macro| (*)"),
- Ok("2|syn v1.0.109|clone-impls,default,derive,parsing,printing,proc-macro,quote|"),
- Ok("3|proc-macro2 v1.0.81|default,proc-macro| (*)"),
- Ok("3|quote v1.0.36|default,proc-macro| (*)"),
- Ok("3|unicode-ident v1.0.12||"),
- ]
- .into_iter()
+ textwrap::dedent(
+ r#"
+ ;tree-data v0.1.0 (/rules_rust/crate_universe/test_data/metadata/tree_data);;
+ |-- ;chrono v0.4.24;clock,default,iana-time-zone,js-sys,oldtime,std,time,wasm-bindgen,wasmbind,winapi;
+ | |-- ;iana-time-zone v0.1.60;fallback;
+ | | `-- ;core-foundation-sys v0.8.6;default,link;
+ | |-- ;num-integer v0.1.46;;
+ | | `-- ;num-traits v0.2.18;i128;
+ | | [build-dependencies]
+ | | `-- ;autocfg v1.2.0;;
+ | |-- ;num-traits v0.2.18;i128; (*)
+ | `-- ;time v0.1.45;;
+ | `-- ;libc v0.2.153;default,std;
+ |-- ;cpufeatures v0.2.7;;
+ | `-- ;libc v0.2.153;default,std;
+ `-- ;serde_derive v1.0.152 (proc-macro);default;
+ |-- ;proc-macro2 v1.0.81;default,proc-macro;
+ | `-- ;unicode-ident v1.0.12;;
+ |-- ;quote v1.0.36;default,proc-macro;
+ | `-- ;proc-macro2 v1.0.81;default,proc-macro; (*)
+ `-- ;syn v1.0.109;clone-impls,default,derive,parsing,printing,proc-macro,quote;
+ |-- ;proc-macro2 v1.0.81;default,proc-macro; (*)
+ |-- ;quote v1.0.36;default,proc-macro; (*)
+ `-- ;unicode-ident v1.0.12;;
+
+ "#,
+ ).lines().map(Ok::<&str, std::io::Error>)
)
.unwrap();
assert_eq!(
@@ -832,7 +864,7 @@
num_traits_id,
CargoTreeEntry {
features: BTreeSet::from(["i128".to_owned()]),
- deps: BTreeSet::from([autocfg_id]),
+ deps: BTreeSet::from([autocfg_id.clone()]),
}
),
(
@@ -900,4 +932,161 @@
output,
);
}
+
+ /// This test is intended to show how nested `[build-dependencies]` are
+ /// successfully parsed and transitive dependencies are tracked (or more
+ /// importantly for N+1 transitive deps, not tracked).
+ #[test]
+ fn parse_features_from_cargo_tree_output_nested_build_deps() {
+ let autocfg_id = CrateId {
+ name: "autocfg".to_owned(),
+ version: Version::new(1, 3, 0),
+ };
+ let nested_build_dependencies_id = CrateId {
+ name: "nested_build_dependencies".to_owned(),
+ version: Version::new(0, 0, 0),
+ };
+ let num_traits_id = CrateId {
+ name: "num-traits".to_owned(),
+ version: Version::new(0, 2, 19),
+ };
+ let proc_macro2_id = CrateId {
+ name: "proc-macro2".to_owned(),
+ version: Version::new(1, 0, 86),
+ };
+ let proc_macro_error_attr_id = CrateId {
+ name: "proc-macro-error-attr".to_owned(),
+ version: Version::new(1, 0, 4),
+ };
+ let quote_id = CrateId {
+ name: "quote".to_owned(),
+ version: Version::new(1, 0, 37),
+ };
+ let syn_id = CrateId {
+ name: "syn".to_owned(),
+ version: Version::new(2, 0, 77),
+ };
+ let unicode_ident_id = CrateId {
+ name: "unicode-ident".to_owned(),
+ version: Version::new(1, 0, 12),
+ };
+ let version_check_id = CrateId {
+ name: "version_check".to_owned(),
+ version: Version::new(0, 9, 5),
+ };
+
+ let output = parse_features_from_cargo_tree_output(
+ textwrap::dedent(
+ r#"
+ ;nested_build_dependencies v0.0.0 (/rules_rust/crate_universe/test_data/metadata/nested_build_dependencies);;
+ [build-dependencies]
+ |-- ;num-traits v0.2.19;default,std;
+ | [build-dependencies]
+ | `-- ;autocfg v1.3.0;;
+ `-- ;syn v2.0.77;clone-impls,default,derive,parsing,printing,proc-macro;
+ |-- ;proc-macro2 v1.0.86;default,proc-macro;
+ | `-- ;unicode-ident v1.0.12;;
+ |-- ;quote v1.0.37;default,proc-macro;
+ | `-- ;proc-macro2 v1.0.86;default,proc-macro; (*)
+ `-- ;unicode-ident v1.0.12;;
+ [dev-dependencies]
+ `-- ;proc-macro-error-attr v1.0.4 (proc-macro);;
+ |-- ;proc-macro2 v1.0.86;default,proc-macro; (*)
+ `-- ;quote v1.0.37;default,proc-macro; (*)
+ [build-dependencies]
+ `-- ;version_check v0.9.5;;
+
+ "#,
+ ).lines().map(Ok::<&str, std::io::Error>)
+ )
+ .unwrap();
+
+ assert_eq!(
+ BTreeMap::from([
+ (
+ autocfg_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::new(),
+ deps: BTreeSet::new(),
+ },
+ ),
+ (
+ nested_build_dependencies_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::new(),
+ deps: BTreeSet::from([
+ num_traits_id.clone(),
+ syn_id.clone(),
+ proc_macro_error_attr_id.clone(),
+ ]),
+ }
+ ),
+ (
+ num_traits_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::from(["default".to_owned(), "std".to_owned()]),
+ deps: BTreeSet::from([autocfg_id.clone()]),
+ }
+ ),
+ (
+ proc_macro_error_attr_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::new(),
+ deps: BTreeSet::from([
+ proc_macro2_id.clone(),
+ quote_id.clone(),
+ version_check_id.clone(),
+ ]),
+ },
+ ),
+ (
+ proc_macro2_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::from(["default".to_owned(), "proc-macro".to_owned()]),
+ deps: BTreeSet::from([unicode_ident_id.clone(),]),
+ }
+ ),
+ (
+ quote_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::from(["default".to_owned(), "proc-macro".to_owned()]),
+ deps: BTreeSet::from([proc_macro2_id.clone()]),
+ }
+ ),
+ (
+ syn_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::from([
+ "clone-impls".to_owned(),
+ "default".to_owned(),
+ "derive".to_owned(),
+ "parsing".to_owned(),
+ "printing".to_owned(),
+ "proc-macro".to_owned(),
+ ]),
+ deps: BTreeSet::from([
+ proc_macro2_id.clone(),
+ quote_id.clone(),
+ unicode_ident_id.clone(),
+ ]),
+ }
+ ),
+ (
+ unicode_ident_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::new(),
+ deps: BTreeSet::new(),
+ }
+ ),
+ (
+ version_check_id.clone(),
+ CargoTreeEntry {
+ features: BTreeSet::new(),
+ deps: BTreeSet::new(),
+ }
+ ),
+ ]),
+ output,
+ );
+ }
}
diff --git a/crate_universe/src/metadata/dependency.rs b/crate_universe/src/metadata/dependency.rs
index 457ce8c..399fc11 100644
--- a/crate_universe/src/metadata/dependency.rs
+++ b/crate_universe/src/metadata/dependency.rs
@@ -517,7 +517,7 @@
let pkg = &metadata[&node.id];
pkg.name == name
})
- .unwrap()
+ .unwrap_or_else(|| panic!("Unable to find node '{}'", name))
}
#[test]
diff --git a/crate_universe/test_data/metadata/nested_build_dependencies/Cargo.lock b/crate_universe/test_data/metadata/nested_build_dependencies/Cargo.lock
new file mode 100644
index 0000000..c5ab22f
--- /dev/null
+++ b/crate_universe/test_data/metadata/nested_build_dependencies/Cargo.lock
@@ -0,0 +1,79 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "autocfg"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
+
+[[package]]
+name = "nested_build_dependencies"
+version = "0.0.0"
+dependencies = [
+ "num-traits",
+ "proc-macro-error-attr",
+ "syn",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.86"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.77"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
diff --git a/crate_universe/test_data/metadata/nested_build_dependencies/Cargo.toml b/crate_universe/test_data/metadata/nested_build_dependencies/Cargo.toml
new file mode 100644
index 0000000..85f4e13
--- /dev/null
+++ b/crate_universe/test_data/metadata/nested_build_dependencies/Cargo.toml
@@ -0,0 +1,18 @@
+[package]
+name = "nested_build_dependencies"
+version = "0.0.0"
+edition = "2021"
+
+# Required to satisfy cargo but no `lib.rs` is expected to
+# exist within test data.
+[lib]
+path = "lib.rs"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[build-dependencies]
+num-traits = "0.2.19"
+syn = "2.0.77"
+
+[dev-dependencies]
+proc-macro-error-attr = "=1.0.4"
diff --git a/crate_universe/test_data/metadata/nested_build_dependencies/metadata.json b/crate_universe/test_data/metadata/nested_build_dependencies/metadata.json
new file mode 100644
index 0000000..5792bea
--- /dev/null
+++ b/crate_universe/test_data/metadata/nested_build_dependencies/metadata.json
@@ -0,0 +1,2012 @@
+{
+ "metadata": null,
+ "packages": [
+ {
+ "authors": [
+ "Josh Stone <cuviper@gmail.com>"
+ ],
+ "categories": [
+ "development-tools::build-utils"
+ ],
+ "default_run": null,
+ "dependencies": [],
+ "description": "Automatic cfg for Rust compiler features",
+ "documentation": "https://docs.rs/autocfg/",
+ "edition": "2015",
+ "features": {},
+ "homepage": null,
+ "id": "registry+https://github.com/rust-lang/crates.io-index#autocfg@1.3.0",
+ "keywords": [
+ "rustc",
+ "build",
+ "autoconf"
+ ],
+ "license": "Apache-2.0 OR MIT",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/Cargo.toml",
+ "metadata": null,
+ "name": "autocfg",
+ "publish": null,
+ "readme": "README.md",
+ "repository": "https://github.com/cuviper/autocfg",
+ "rust_version": "1.0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2015",
+ "kind": [
+ "lib"
+ ],
+ "name": "autocfg",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/src/lib.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "example"
+ ],
+ "name": "integers",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/examples/integers.rs",
+ "test": false
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "example"
+ ],
+ "name": "nightly",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/examples/nightly.rs",
+ "test": false
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "example"
+ ],
+ "name": "paths",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/examples/paths.rs",
+ "test": false
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "example"
+ ],
+ "name": "traits",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/examples/traits.rs",
+ "test": false
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "example"
+ ],
+ "name": "versions",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/examples/versions.rs",
+ "test": false
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "test"
+ ],
+ "name": "no_std",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/tests/no_std.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "test"
+ ],
+ "name": "rustflags",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/tests/rustflags.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2015",
+ "kind": [
+ "test"
+ ],
+ "name": "wrappers",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.3.0/tests/wrappers.rs",
+ "test": true
+ }
+ ],
+ "version": "1.3.0"
+ },
+ {
+ "authors": [],
+ "categories": [],
+ "default_run": null,
+ "dependencies": [
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "proc-macro-error-attr",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "=1.0.4",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "build",
+ "name": "num-traits",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.2.19",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "build",
+ "name": "syn",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^2.0.77",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ }
+ ],
+ "description": null,
+ "documentation": null,
+ "edition": "2021",
+ "features": {},
+ "homepage": null,
+ "id": "path+file://{TEMP_DIR}/nested_build_dependencies#0.0.0",
+ "keywords": [],
+ "license": null,
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{TEMP_DIR}/nested_build_dependencies/Cargo.toml",
+ "metadata": null,
+ "name": "nested_build_dependencies",
+ "publish": null,
+ "readme": null,
+ "repository": null,
+ "rust_version": null,
+ "source": null,
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2021",
+ "kind": [
+ "lib"
+ ],
+ "name": "nested_build_dependencies",
+ "src_path": "{TEMP_DIR}/nested_build_dependencies/lib.rs",
+ "test": true
+ }
+ ],
+ "version": "0.0.0"
+ },
+ {
+ "authors": [
+ "The Rust Project Developers"
+ ],
+ "categories": [
+ "algorithms",
+ "science",
+ "no-std"
+ ],
+ "default_run": null,
+ "dependencies": [
+ {
+ "features": [],
+ "kind": null,
+ "name": "libm",
+ "optional": true,
+ "registry": null,
+ "rename": null,
+ "req": "^0.2.0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "build",
+ "name": "autocfg",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ }
+ ],
+ "description": "Numeric traits for generic mathematics",
+ "documentation": "https://docs.rs/num-traits",
+ "edition": "2021",
+ "features": {
+ "default": [
+ "std"
+ ],
+ "i128": [],
+ "libm": [
+ "dep:libm"
+ ],
+ "std": []
+ },
+ "homepage": "https://github.com/rust-num/num-traits",
+ "id": "registry+https://github.com/rust-lang/crates.io-index#num-traits@0.2.19",
+ "keywords": [
+ "mathematics",
+ "numerics"
+ ],
+ "license": "MIT OR Apache-2.0",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/Cargo.toml",
+ "metadata": {
+ "docs": {
+ "rs": {
+ "features": [
+ "std"
+ ],
+ "rustdoc-args": [
+ "--generate-link-to-definition"
+ ]
+ }
+ }
+ },
+ "name": "num-traits",
+ "publish": null,
+ "readme": "README.md",
+ "repository": "https://github.com/rust-num/num-traits",
+ "rust_version": "1.60",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2021",
+ "kind": [
+ "lib"
+ ],
+ "name": "num_traits",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "cast",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/tests/cast.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "custom-build"
+ ],
+ "name": "build-script-build",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/build.rs",
+ "test": false
+ }
+ ],
+ "version": "0.2.19"
+ },
+ {
+ "authors": [
+ "CreepySkeleton <creepy-skeleton@yandex.ru>"
+ ],
+ "categories": [],
+ "default_run": null,
+ "dependencies": [
+ {
+ "features": [],
+ "kind": null,
+ "name": "proc-macro2",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": null,
+ "name": "quote",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "build",
+ "name": "version_check",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.9",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ }
+ ],
+ "description": "Attribute macro for proc-macro-error crate",
+ "documentation": null,
+ "edition": "2018",
+ "features": {},
+ "homepage": null,
+ "id": "registry+https://github.com/rust-lang/crates.io-index#proc-macro-error-attr@1.0.4",
+ "keywords": [],
+ "license": "MIT OR Apache-2.0",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro-error-attr-1.0.4/Cargo.toml",
+ "metadata": {
+ "docs": {
+ "rs": {
+ "targets": [
+ "x86_64-unknown-linux-gnu"
+ ]
+ }
+ }
+ },
+ "name": "proc-macro-error-attr",
+ "publish": null,
+ "readme": null,
+ "repository": "https://gitlab.com/CreepySkeleton/proc-macro-error",
+ "rust_version": null,
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "proc-macro"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2018",
+ "kind": [
+ "proc-macro"
+ ],
+ "name": "proc_macro_error_attr",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro-error-attr-1.0.4/src/lib.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2018",
+ "kind": [
+ "custom-build"
+ ],
+ "name": "build-script-build",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro-error-attr-1.0.4/build.rs",
+ "test": false
+ }
+ ],
+ "version": "1.0.4"
+ },
+ {
+ "authors": [
+ "David Tolnay <dtolnay@gmail.com>",
+ "Alex Crichton <alex@alexcrichton.com>"
+ ],
+ "categories": [
+ "development-tools::procedural-macro-helpers"
+ ],
+ "default_run": null,
+ "dependencies": [
+ {
+ "features": [],
+ "kind": null,
+ "name": "unicode-ident",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "flate2",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "quote",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": false
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "rayon",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "rustversion",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "tar",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.4",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ }
+ ],
+ "description": "A substitute implementation of the compiler's `proc_macro` API to decouple token-based libraries from the procedural macro use case.",
+ "documentation": "https://docs.rs/proc-macro2",
+ "edition": "2021",
+ "features": {
+ "default": [
+ "proc-macro"
+ ],
+ "nightly": [],
+ "proc-macro": [],
+ "span-locations": []
+ },
+ "homepage": null,
+ "id": "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86",
+ "keywords": [
+ "macros",
+ "syn"
+ ],
+ "license": "MIT OR Apache-2.0",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/Cargo.toml",
+ "metadata": {
+ "docs": {
+ "rs": {
+ "rustc-args": [
+ "--cfg",
+ "procmacro2_semver_exempt"
+ ],
+ "rustdoc-args": [
+ "--cfg",
+ "procmacro2_semver_exempt",
+ "--generate-link-to-definition"
+ ],
+ "targets": [
+ "x86_64-unknown-linux-gnu"
+ ]
+ }
+ },
+ "playground": {
+ "features": [
+ "span-locations"
+ ]
+ }
+ },
+ "name": "proc-macro2",
+ "publish": null,
+ "readme": "README.md",
+ "repository": "https://github.com/dtolnay/proc-macro2",
+ "rust_version": "1.56",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2021",
+ "kind": [
+ "lib"
+ ],
+ "name": "proc_macro2",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/src/lib.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "comments",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/tests/comments.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "features",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/tests/features.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "marker",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/tests/marker.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/tests/test.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_fmt",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/tests/test_fmt.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_size",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/tests/test_size.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "custom-build"
+ ],
+ "name": "build-script-build",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.86/build.rs",
+ "test": false
+ }
+ ],
+ "version": "1.0.86"
+ },
+ {
+ "authors": [
+ "David Tolnay <dtolnay@gmail.com>"
+ ],
+ "categories": [
+ "development-tools::procedural-macro-helpers"
+ ],
+ "default_run": null,
+ "dependencies": [
+ {
+ "features": [],
+ "kind": null,
+ "name": "proc-macro2",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0.80",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": false
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "rustversion",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [
+ "diff"
+ ],
+ "kind": "dev",
+ "name": "trybuild",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0.66",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ }
+ ],
+ "description": "Quasi-quoting macro quote!(...)",
+ "documentation": "https://docs.rs/quote/",
+ "edition": "2018",
+ "features": {
+ "default": [
+ "proc-macro"
+ ],
+ "proc-macro": [
+ "proc-macro2/proc-macro"
+ ]
+ },
+ "homepage": null,
+ "id": "registry+https://github.com/rust-lang/crates.io-index#quote@1.0.37",
+ "keywords": [
+ "macros",
+ "syn"
+ ],
+ "license": "MIT OR Apache-2.0",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/quote-1.0.37/Cargo.toml",
+ "metadata": {
+ "docs": {
+ "rs": {
+ "rustdoc-args": [
+ "--generate-link-to-definition"
+ ],
+ "targets": [
+ "x86_64-unknown-linux-gnu"
+ ]
+ }
+ }
+ },
+ "name": "quote",
+ "publish": null,
+ "readme": "README.md",
+ "repository": "https://github.com/dtolnay/quote",
+ "rust_version": "1.56",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2018",
+ "kind": [
+ "lib"
+ ],
+ "name": "quote",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/quote-1.0.37/src/lib.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2018",
+ "kind": [
+ "test"
+ ],
+ "name": "compiletest",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/quote-1.0.37/tests/compiletest.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2018",
+ "kind": [
+ "test"
+ ],
+ "name": "test",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/quote-1.0.37/tests/test.rs",
+ "test": true
+ }
+ ],
+ "version": "1.0.37"
+ },
+ {
+ "authors": [
+ "David Tolnay <dtolnay@gmail.com>"
+ ],
+ "categories": [
+ "development-tools::procedural-macro-helpers",
+ "parser-implementations"
+ ],
+ "default_run": null,
+ "dependencies": [
+ {
+ "features": [],
+ "kind": null,
+ "name": "proc-macro2",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0.83",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": false
+ },
+ {
+ "features": [],
+ "kind": null,
+ "name": "quote",
+ "optional": true,
+ "registry": null,
+ "rename": null,
+ "req": "^1.0.35",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": false
+ },
+ {
+ "features": [],
+ "kind": null,
+ "name": "unicode-ident",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "anyhow",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "automod",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "insta",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "ref-cast",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "rustversion",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "syn-test-suite",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "termcolor",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "flate2",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": "cfg(not(miri))",
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "rayon",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": "cfg(not(miri))",
+ "uses_default_features": true
+ },
+ {
+ "features": [
+ "blocking"
+ ],
+ "kind": "dev",
+ "name": "reqwest",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.12",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": "cfg(not(miri))",
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "tar",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.4.16",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": "cfg(not(miri))",
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "walkdir",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^2.3.2",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": "cfg(not(miri))",
+ "uses_default_features": true
+ }
+ ],
+ "description": "Parser for Rust source code",
+ "documentation": "https://docs.rs/syn",
+ "edition": "2021",
+ "features": {
+ "clone-impls": [],
+ "default": [
+ "derive",
+ "parsing",
+ "printing",
+ "clone-impls",
+ "proc-macro"
+ ],
+ "derive": [],
+ "extra-traits": [],
+ "fold": [],
+ "full": [],
+ "parsing": [],
+ "printing": [
+ "dep:quote"
+ ],
+ "proc-macro": [
+ "proc-macro2/proc-macro",
+ "quote?/proc-macro"
+ ],
+ "test": [
+ "syn-test-suite/all-features"
+ ],
+ "visit": [],
+ "visit-mut": []
+ },
+ "homepage": null,
+ "id": "registry+https://github.com/rust-lang/crates.io-index#syn@2.0.77",
+ "keywords": [
+ "macros",
+ "syn"
+ ],
+ "license": "MIT OR Apache-2.0",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/Cargo.toml",
+ "metadata": {
+ "docs": {
+ "rs": {
+ "all-features": true,
+ "rustdoc-args": [
+ "--generate-link-to-definition"
+ ],
+ "targets": [
+ "x86_64-unknown-linux-gnu"
+ ]
+ }
+ },
+ "playground": {
+ "features": [
+ "full",
+ "visit",
+ "visit-mut",
+ "fold",
+ "extra-traits"
+ ]
+ }
+ },
+ "name": "syn",
+ "publish": null,
+ "readme": "README.md",
+ "repository": "https://github.com/dtolnay/syn",
+ "rust_version": "1.61",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2021",
+ "kind": [
+ "lib"
+ ],
+ "name": "syn",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/src/lib.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "regression",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/regression.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_asyncness",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_asyncness.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_attribute",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_attribute.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_derive_input",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_derive_input.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_expr",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_expr.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_generics",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_generics.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_grouping",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_grouping.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_ident",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_ident.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_item",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_item.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_iterators",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_iterators.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_lit",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_lit.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_meta",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_meta.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_parse_buffer",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_parse_buffer.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_parse_quote",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_parse_quote.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_parse_stream",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_parse_stream.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_pat",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_pat.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_path",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_path.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_precedence",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_precedence.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_receiver",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_receiver.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_round_trip",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_round_trip.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_shebang",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_shebang.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_size",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_size.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_stmt",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_stmt.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_token_trees",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_token_trees.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_ty",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_ty.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_unparenthesize",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_unparenthesize.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "test_visibility",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/test_visibility.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "test"
+ ],
+ "name": "zzz_stable",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/tests/zzz_stable.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "bench"
+ ],
+ "name": "file",
+ "required-features": [
+ "full",
+ "parsing"
+ ],
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/benches/file.rs",
+ "test": false
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2021",
+ "kind": [
+ "bench"
+ ],
+ "name": "rust",
+ "required-features": [
+ "full",
+ "parsing"
+ ],
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.77/benches/rust.rs",
+ "test": false
+ }
+ ],
+ "version": "2.0.77"
+ },
+ {
+ "authors": [
+ "David Tolnay <dtolnay@gmail.com>"
+ ],
+ "categories": [
+ "development-tools::procedural-macro-helpers",
+ "no-std",
+ "no-std::no-alloc"
+ ],
+ "default_run": null,
+ "dependencies": [
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "criterion",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.5",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": false
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "fst",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.4",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [
+ "small_rng"
+ ],
+ "kind": "dev",
+ "name": "rand",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.8",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "roaring",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.10",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "ucd-trie",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.1",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": false
+ },
+ {
+ "features": [],
+ "kind": "dev",
+ "name": "unicode-xid",
+ "optional": false,
+ "registry": null,
+ "rename": null,
+ "req": "^0.2.4",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "target": null,
+ "uses_default_features": true
+ }
+ ],
+ "description": "Determine whether characters have the XID_Start or XID_Continue properties according to Unicode Standard Annex #31",
+ "documentation": "https://docs.rs/unicode-ident",
+ "edition": "2018",
+ "features": {},
+ "homepage": null,
+ "id": "registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.12",
+ "keywords": [
+ "unicode",
+ "xid"
+ ],
+ "license": "(MIT OR Apache-2.0) AND Unicode-DFS-2016",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.12/Cargo.toml",
+ "metadata": {
+ "docs": {
+ "rs": {
+ "rustdoc-args": [
+ "--generate-link-to-definition"
+ ],
+ "targets": [
+ "x86_64-unknown-linux-gnu"
+ ]
+ }
+ }
+ },
+ "name": "unicode-ident",
+ "publish": null,
+ "readme": "README.md",
+ "repository": "https://github.com/dtolnay/unicode-ident",
+ "rust_version": "1.31",
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2018",
+ "kind": [
+ "lib"
+ ],
+ "name": "unicode_ident",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.12/src/lib.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2018",
+ "kind": [
+ "test"
+ ],
+ "name": "compare",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.12/tests/compare.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2018",
+ "kind": [
+ "test"
+ ],
+ "name": "static_size",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.12/tests/static_size.rs",
+ "test": true
+ },
+ {
+ "crate_types": [
+ "bin"
+ ],
+ "doc": false,
+ "doctest": false,
+ "edition": "2018",
+ "kind": [
+ "bench"
+ ],
+ "name": "xid",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.12/benches/xid.rs",
+ "test": false
+ }
+ ],
+ "version": "1.0.12"
+ },
+ {
+ "authors": [
+ "Sergio Benitez <sb@sergio.bz>"
+ ],
+ "categories": [],
+ "default_run": null,
+ "dependencies": [],
+ "description": "Tiny crate to check the version of the installed/running rustc.",
+ "documentation": "https://docs.rs/version_check/",
+ "edition": "2015",
+ "features": {},
+ "homepage": null,
+ "id": "registry+https://github.com/rust-lang/crates.io-index#version_check@0.9.5",
+ "keywords": [
+ "version",
+ "rustc",
+ "minimum",
+ "check"
+ ],
+ "license": "MIT/Apache-2.0",
+ "license_file": null,
+ "links": null,
+ "manifest_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/version_check-0.9.5/Cargo.toml",
+ "metadata": null,
+ "name": "version_check",
+ "publish": null,
+ "readme": "README.md",
+ "repository": "https://github.com/SergioBenitez/version_check",
+ "rust_version": null,
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
+ "targets": [
+ {
+ "crate_types": [
+ "lib"
+ ],
+ "doc": true,
+ "doctest": true,
+ "edition": "2015",
+ "kind": [
+ "lib"
+ ],
+ "name": "version_check",
+ "src_path": "{CARGO_HOME}/registry/src/index.crates.io-6f17d22bba15001f/version_check-0.9.5/src/lib.rs",
+ "test": true
+ }
+ ],
+ "version": "0.9.5"
+ }
+ ],
+ "resolve": {
+ "nodes": [
+ {
+ "dependencies": [],
+ "deps": [],
+ "features": [],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#autocfg@1.3.0"
+ },
+ {
+ "dependencies": [
+ "registry+https://github.com/rust-lang/crates.io-index#num-traits@0.2.19",
+ "registry+https://github.com/rust-lang/crates.io-index#proc-macro-error-attr@1.0.4",
+ "registry+https://github.com/rust-lang/crates.io-index#syn@2.0.77"
+ ],
+ "deps": [
+ {
+ "dep_kinds": [
+ {
+ "kind": "build",
+ "target": null
+ }
+ ],
+ "name": "num_traits",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#num-traits@0.2.19"
+ },
+ {
+ "dep_kinds": [
+ {
+ "kind": "dev",
+ "target": null
+ }
+ ],
+ "name": "proc_macro_error_attr",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#proc-macro-error-attr@1.0.4"
+ },
+ {
+ "dep_kinds": [
+ {
+ "kind": "build",
+ "target": null
+ }
+ ],
+ "name": "syn",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#syn@2.0.77"
+ }
+ ],
+ "features": [],
+ "id": "path+file://{TEMP_DIR}/nested_build_dependencies#0.0.0"
+ },
+ {
+ "dependencies": [
+ "registry+https://github.com/rust-lang/crates.io-index#autocfg@1.3.0"
+ ],
+ "deps": [
+ {
+ "dep_kinds": [
+ {
+ "kind": "build",
+ "target": null
+ }
+ ],
+ "name": "autocfg",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#autocfg@1.3.0"
+ }
+ ],
+ "features": [
+ "default",
+ "std"
+ ],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#num-traits@0.2.19"
+ },
+ {
+ "dependencies": [
+ "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86",
+ "registry+https://github.com/rust-lang/crates.io-index#quote@1.0.37",
+ "registry+https://github.com/rust-lang/crates.io-index#version_check@0.9.5"
+ ],
+ "deps": [
+ {
+ "dep_kinds": [
+ {
+ "kind": null,
+ "target": null
+ }
+ ],
+ "name": "proc_macro2",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86"
+ },
+ {
+ "dep_kinds": [
+ {
+ "kind": null,
+ "target": null
+ }
+ ],
+ "name": "quote",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#quote@1.0.37"
+ },
+ {
+ "dep_kinds": [
+ {
+ "kind": "build",
+ "target": null
+ }
+ ],
+ "name": "version_check",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#version_check@0.9.5"
+ }
+ ],
+ "features": [],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#proc-macro-error-attr@1.0.4"
+ },
+ {
+ "dependencies": [
+ "registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.12"
+ ],
+ "deps": [
+ {
+ "dep_kinds": [
+ {
+ "kind": null,
+ "target": null
+ }
+ ],
+ "name": "unicode_ident",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.12"
+ }
+ ],
+ "features": [
+ "default",
+ "proc-macro"
+ ],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86"
+ },
+ {
+ "dependencies": [
+ "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86"
+ ],
+ "deps": [
+ {
+ "dep_kinds": [
+ {
+ "kind": null,
+ "target": null
+ }
+ ],
+ "name": "proc_macro2",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86"
+ }
+ ],
+ "features": [
+ "default",
+ "proc-macro"
+ ],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#quote@1.0.37"
+ },
+ {
+ "dependencies": [
+ "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86",
+ "registry+https://github.com/rust-lang/crates.io-index#quote@1.0.37",
+ "registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.12"
+ ],
+ "deps": [
+ {
+ "dep_kinds": [
+ {
+ "kind": null,
+ "target": null
+ }
+ ],
+ "name": "proc_macro2",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.86"
+ },
+ {
+ "dep_kinds": [
+ {
+ "kind": null,
+ "target": null
+ }
+ ],
+ "name": "quote",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#quote@1.0.37"
+ },
+ {
+ "dep_kinds": [
+ {
+ "kind": null,
+ "target": null
+ }
+ ],
+ "name": "unicode_ident",
+ "pkg": "registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.12"
+ }
+ ],
+ "features": [
+ "clone-impls",
+ "default",
+ "derive",
+ "parsing",
+ "printing",
+ "proc-macro"
+ ],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#syn@2.0.77"
+ },
+ {
+ "dependencies": [],
+ "deps": [],
+ "features": [],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.12"
+ },
+ {
+ "dependencies": [],
+ "deps": [],
+ "features": [],
+ "id": "registry+https://github.com/rust-lang/crates.io-index#version_check@0.9.5"
+ }
+ ],
+ "root": "path+file://{TEMP_DIR}/nested_build_dependencies#0.0.0"
+ },
+ "target_directory": "{TEMP_DIR}/nested_build_dependencies/target",
+ "version": 1,
+ "workspace_default_members": [
+ "path+file://{TEMP_DIR}/nested_build_dependencies#0.0.0"
+ ],
+ "workspace_members": [
+ "path+file://{TEMP_DIR}/nested_build_dependencies#0.0.0"
+ ],
+ "workspace_root": "{TEMP_DIR}/nested_build_dependencies"
+}
diff --git a/crate_universe/tests/cargo_integration_test.rs b/crate_universe/tests/cargo_integration_test.rs
index 879d6f8..7682798 100644
--- a/crate_universe/tests/cargo_integration_test.rs
+++ b/crate_universe/tests/cargo_integration_test.rs
@@ -147,7 +147,6 @@
);
assert_eq!(
- metadata["metadata"]["cargo-bazel"]["tree_metadata"]["wgpu-hal 0.14.1"],
json!({
"common": {
"deps": [
@@ -236,7 +235,8 @@
],
},
},
- })
+ }),
+ metadata["metadata"]["cargo-bazel"]["tree_metadata"]["wgpu-hal 0.14.1"],
);
}
@@ -264,7 +264,6 @@
);
assert_eq!(
- metadata["metadata"]["cargo-bazel"]["tree_metadata"],
json!({
"autocfg 1.1.0": {
"selects": {},
@@ -305,7 +304,8 @@
},
},
},
- })
+ }),
+ metadata["metadata"]["cargo-bazel"]["tree_metadata"],
);
}
@@ -369,7 +369,6 @@
// serde appears twice in the list of dependencies, with and without derive features
assert_eq!(
- metadata["metadata"]["cargo-bazel"]["tree_metadata"]["serde 1.0.158"]["common"],
json!({
"deps": [
"serde_derive 1.0.158",
@@ -380,7 +379,8 @@
"serde_derive",
"std",
],
- })
+ }),
+ metadata["metadata"]["cargo-bazel"]["tree_metadata"]["serde 1.0.158"]["common"],
);
}
@@ -408,7 +408,6 @@
);
assert_eq!(
- metadata["metadata"]["cargo-bazel"]["tree_metadata"]["tokio 1.37.0"],
json!({
"common": {
"deps": [
@@ -478,11 +477,11 @@
],
},
},
- })
+ }),
+ metadata["metadata"]["cargo-bazel"]["tree_metadata"]["tokio 1.37.0"],
);
assert_eq!(
- metadata["metadata"]["cargo-bazel"]["tree_metadata"]["iana-time-zone 0.1.60"],
json!({
// Note linux is not present since linux has no unique dependencies or features
// for this crate.
@@ -504,6 +503,7 @@
],
},
},
- })
+ }),
+ metadata["metadata"]["cargo-bazel"]["tree_metadata"]["iana-time-zone 0.1.60"],
);
}