Bug 1817900 - Update cargo_metadata to 0.15.3. r=emilio,supply-chain-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D170429
This commit is contained in:
Mike Hommey 2023-02-23 01:00:57 +00:00
Родитель e552674037
Коммит 54d876838f
5 изменённых файлов: 41 добавлений и 4 удалений

4
Cargo.lock сгенерированный
Просмотреть файл

@ -658,9 +658,9 @@ dependencies = [
[[package]]
name = "cargo_metadata"
version = "0.15.2"
version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "982a0cf6a99c350d7246035613882e376d58cebe571785abc5da4f648d53ac0a"
checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07"
dependencies = [
"camino",
"cargo-platform",

Просмотреть файл

@ -284,6 +284,11 @@ criteria = "safe-to-deploy"
version = "0.15.2"
notes = "I reviewed the whole code base. Parser for the output of cargo-metadata, relying mostly on serde. No unsafe code used."
[[audits.cargo_metadata]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "0.15.2 -> 0.15.3"
[[audits.chardetng]]
who = "Henri Sivonen <hsivonen@hsivonen.fi>"
criteria = "safe-to-deploy"

Просмотреть файл

@ -1 +1 @@
{"files":{"CHANGELOG.md":"8b3e29799cdedf02f169bb519072ace2e2b6b9413f4ce8fa0666c2d1d964084e","Cargo.toml":"4985edbf3071a2f67c7b6292840634b73f26dd667981bf9cbebb5b254416ced2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"d51a5b3347bed2441b20986be81bfd4611ca2c5614f950116b273199a9bcf2de","src/dependency.rs":"c593ddc73d863c5712e2aba58b5f4d9bd915a5ac0bc17df71642aa79aa93bfdc","src/diagnostic.rs":"fee47d27390f1026ff99ffade5dfd2ab3e9b9839c3f33ce91a7dcde875551374","src/errors.rs":"797afd61efdd843ae570d9e972dd2425d33823d4a78c0c488028493dffb45c7a","src/lib.rs":"20216b98b9af855b9ef61cb4ecf68ae17b443add83e6888d14f578b8de4ad6ea","src/messages.rs":"a8e3ee31dc8cce5762b4b085be29fe4d7189a789f3a149ef2b6c17604d94528b","tests/selftest.rs":"73afd494c1bf7dd4e1a99971e9ff66a0e21fc7bf3e327663df15d2350dcdfc70","tests/test_samples.rs":"ee2b4737adfa1930c1610bb3ec0fc94b7f1a3691bb09545da69044eef2f5ba6b"},"package":"982a0cf6a99c350d7246035613882e376d58cebe571785abc5da4f648d53ac0a"}
{"files":{"CHANGELOG.md":"8b3e29799cdedf02f169bb519072ace2e2b6b9413f4ce8fa0666c2d1d964084e","Cargo.toml":"57d432cd172cc87ee4c31b0e4c21c52d06ba1a48da9decd34581b2671c47d71d","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"d51a5b3347bed2441b20986be81bfd4611ca2c5614f950116b273199a9bcf2de","src/dependency.rs":"c593ddc73d863c5712e2aba58b5f4d9bd915a5ac0bc17df71642aa79aa93bfdc","src/diagnostic.rs":"fee47d27390f1026ff99ffade5dfd2ab3e9b9839c3f33ce91a7dcde875551374","src/errors.rs":"797afd61efdd843ae570d9e972dd2425d33823d4a78c0c488028493dffb45c7a","src/lib.rs":"5ec701f3589c5d71c152b5abe7ad5f222aee4d4a5f9992bced1d357bad36e227","src/messages.rs":"a8e3ee31dc8cce5762b4b085be29fe4d7189a789f3a149ef2b6c17604d94528b","tests/selftest.rs":"73afd494c1bf7dd4e1a99971e9ff66a0e21fc7bf3e327663df15d2350dcdfc70","tests/test_samples.rs":"ee2b4737adfa1930c1610bb3ec0fc94b7f1a3691bb09545da69044eef2f5ba6b"},"package":"08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07"}

2
third_party/rust/cargo_metadata/Cargo.toml поставляемый
Просмотреть файл

@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.42.0"
name = "cargo_metadata"
version = "0.15.2"
version = "0.15.3"
authors = ["Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>"]
description = "structured access to the output of `cargo metadata`"
readme = "README.md"

32
third_party/rust/cargo_metadata/src/lib.rs поставляемый
Просмотреть файл

@ -83,6 +83,7 @@ use camino::Utf8PathBuf;
use derive_builder::Builder;
use std::collections::HashMap;
use std::env;
use std::ffi::OsString;
use std::fmt;
use std::hash::Hash;
use std::path::PathBuf;
@ -592,6 +593,9 @@ pub struct MetadataCommand {
/// Arbitrary command line flags to pass to `cargo`. These will be added
/// to the end of the command line invocation.
other_options: Vec<String>,
/// Arbitrary environment variables to set when running `cargo`. These will be merged into
/// the calling environment, overriding any which clash.
env: HashMap<OsString, OsString>,
/// Show stderr
verbose: bool,
}
@ -689,6 +693,32 @@ impl MetadataCommand {
self
}
/// Arbitrary environment variables to set when running `cargo`. These will be merged into
/// the calling environment, overriding any which clash.
///
/// Some examples of when you may want to use this:
/// 1. Setting cargo config values without needing a .cargo/config.toml file, e.g. to set
/// `CARGO_NET_GIT_FETCH_WITH_CLI=true`
/// 2. To specify a custom path to RUSTC if your rust toolchain components aren't laid out in
/// the way cargo expects by default.
///
/// ```no_run
/// # use cargo_metadata::{CargoOpt, MetadataCommand};
/// MetadataCommand::new()
/// .env("CARGO_NET_GIT_FETCH_WITH_CLI", "true")
/// .env("RUSTC", "/path/to/rustc")
/// // ...
/// # ;
/// ```
pub fn env<K: Into<OsString>, V: Into<OsString>>(
&mut self,
key: K,
val: V,
) -> &mut MetadataCommand {
self.env.insert(key.into(), val.into());
self
}
/// Set whether to show stderr
pub fn verbose(&mut self, verbose: bool) -> &mut MetadataCommand {
self.verbose = verbose;
@ -729,6 +759,8 @@ impl MetadataCommand {
}
cmd.args(&self.other_options);
cmd.envs(&self.env);
cmd
}