Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cargo-readme #3397

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
242 changes: 161 additions & 81 deletions sources/Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sources/api/apiclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ simplelog = "0.12"
snafu = { version = "0.7", features = ["futures"] }
tokio = { version = "~1.25", default-features = false, features = ["fs", "io-std", "io-util", "macros", "rt-multi-thread", "time"] } # LTS
tokio-tungstenite = { version = "0.16", default-features = false, features = ["connect"] }
toml = "0.5"
toml = "0.7"
unindent = "0.1"
url = "2"

Expand Down
2 changes: 1 addition & 1 deletion sources/api/apiserver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ generate-readme = { version = "0.1", path = "../../generate-readme" }

[dev-dependencies]
maplit = "1"
toml = "0.5"
toml = "0.7"
2 changes: 1 addition & 1 deletion sources/api/datastore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ generate-readme = { version = "0.1", path = "../../generate-readme" }

[dev-dependencies]
maplit = "1"
toml = "0.5"
toml = "0.7"
2 changes: 1 addition & 1 deletion sources/api/early-boot-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ serde-xml-rs = "0.6"
simplelog = "0.12"
snafu = "0.7"
tokio = { version = "~1.25", default-features = false, features = ["macros", "rt-multi-thread"] } # LTS
toml = "0.5"
toml = "0.7"

[target.'cfg(target_arch = "x86_64")'.dependencies]
# vmw_backdoor includes x86_64 assembly, prevent it from building for ARM
Expand Down
2 changes: 1 addition & 1 deletion sources/api/schnauzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ serde_json = "1"
serde_plain = "1"
snafu = "0.7"
tokio = { version = "~1.25", default-features = false, features = ["macros", "rt-multi-thread"] } # LTS
toml = "0.5"
toml = "0.7"
url = "2"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion sources/api/shibaken/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde_json = "1"
simplelog = "0.12"
snafu = "0.7"
tokio = { version = "~1.25", default-features = false, features = ["macros", "rt-multi-thread"] } # LTS
toml = "0.5"
toml = "0.7"

[build-dependencies]
generate-readme = { version = "0.1", path = "../../generate-readme" }
Expand Down
4 changes: 2 additions & 2 deletions sources/api/storewolf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rand = { version = "0.8", default-features = false, features = ["std", "std_rng"
semver = "1"
simplelog = "0.12"
snafu = "0.7"
toml = "0.5"
toml = "0.7"

[build-dependencies]
bottlerocket-variant = { version = "0.1", path = "../../bottlerocket-variant" }
Expand All @@ -32,7 +32,7 @@ merge-toml = { path = "merge-toml", version = "0.1" }
# so it's important that it remains reentrant.
models = { path = "../../models", version = "0.1" }
snafu = "0.7"
toml = "0.5"
toml = "0.7"
walkdir = "2"

[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion sources/api/storewolf/merge-toml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ publish = false

[dependencies]
snafu = "0.7"
toml = "0.5"
toml = "0.7"
14 changes: 7 additions & 7 deletions sources/api/storewolf/merge-toml/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,32 @@ type Result<T> = std::result::Result<T, error::Error>;
#[cfg(test)]
mod test {
use super::merge_values;
use toml::toml;
use toml::{toml, Value};

#[test]
fn merge() {
let mut left = toml! {
let mut left = Value::Table(toml! {
top1 = "left top1"
top2 = "left top2"
[settings.inner]
inner_setting1 = "left inner_setting1"
inner_setting2 = "left inner_setting2"
};
let right = toml! {
});
let right = Value::Table(toml! {
top1 = "right top1"
[settings]
setting = "right setting"
[settings.inner]
inner_setting1 = "right inner_setting1"
inner_setting3 = "right inner_setting3"
};
});
// Can't comment inside this toml, unfortunately.
// "top1" is being overwritten from right.
// "top2" is only in the left and remains.
// "setting" is only in the right side.
// "inner" tests that recursion works; inner_setting1 is replaced, 2 is untouched, and
// 3 is new.
let expected = toml! {
let expected = Value::Table(toml! {
top1 = "right top1"
top2 = "left top2"
[settings]
Expand All @@ -105,7 +105,7 @@ mod test {
inner_setting1 = "right inner_setting1"
inner_setting2 = "left inner_setting2"
inner_setting3 = "right inner_setting3"
};
});
merge_values(&mut left, &right).unwrap();
assert_eq!(left, expected);
}
Expand Down
2 changes: 1 addition & 1 deletion sources/cfsignal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ log = "0.4"
serde = { version = "1", features = ["derive"] }
simplelog = "0.12"
snafu = { version = "0.7" }
toml = "0.5"
toml = "0.7"
tokio = { version = "~1.25", default-features = false, features = ["macros", "rt-multi-thread"] }
aws-config = "0.55"
aws-sdk-cloudformation = "0.28"
Expand Down
21 changes: 9 additions & 12 deletions sources/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ license-files = [
multiple-versions = "deny"
wildcards = "deny"

deny = [
{ name = "structopt" },
{ name = "clap", wrappers = [ "cargo-readme" ] },
]

skip = [
# Tough is using an older version of globset which is using
# an older version of aho-corasick
{ name = "aho-corasick", version = "=0.7" },
# Netdog is using a feature of toml 0.5 that does not exist in
Copy link
Contributor Author

@webern webern Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zmrow and @yeazelm 😢

#3422

# newer versions.
# https://github.com/bottlerocket-os/bottlerocket/issues/3422
{ name = "toml", version = "=0.5" },
# Indexmap and cached are using different versions of hashbrown
{ name = "hashbrown", version = "=0.13" },
]

skip-tree = [
Expand All @@ -74,13 +78,6 @@ skip-tree = [
# dependency tree because windows-sys has many sub-crates
# that differ in major version.
{ name = "windows-sys", version = "=0.42.0" },
# generate-readme pulls in an older clap that causes some duplicate
# dependencies
{ name = "generate-readme", version = "=0.1.0" },
# serde_yaml actually uses a newer hashbrown dependency,
# but several crates in the graph pull in an older one, so skip for now
# until they can be updated
{ name = "hashbrown", version = "=0.13.2" }
]

[sources]
Expand Down
2 changes: 1 addition & 1 deletion sources/driverdog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ simplelog = "0.12"
snafu = "0.7"
serde = { version = "1", features = ["derive"] }
tempfile = "3"
toml = "0.5"
toml = "0.7"

[build-dependencies]
generate-readme = { version = "0.1", path = "../generate-readme" }
7 changes: 4 additions & 3 deletions sources/driverdog/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,10 @@ fn run() -> Result<()> {
.flatten()
{
let path = entry.path();
let modules_sets: HashMap<String, DriverConfig> =
toml::from_slice(&fs::read(&path).context(error::ReadPathSnafu { path: &path })?)
.context(error::DeserializeSnafu { path: &path })?;
let modules_sets: HashMap<String, DriverConfig> = toml::from_str(
&fs::read_to_string(&path).context(error::ReadPathSnafu { path: &path })?,
)
.context(error::DeserializeSnafu { path: &path })?;

all_modules_sets.extend(modules_sets);
}
Expand Down
2 changes: 1 addition & 1 deletion sources/metricdog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
simplelog = "0.12"
snafu = { version = "0.7" }
toml = "0.5"
toml = "0.7"
url = "2"

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion sources/models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_plain = "1"
snafu = "0.7"
toml = "0.5"
toml = "0.7"
x509-parser = "0.14"
url = "2"

Expand Down
2 changes: 1 addition & 1 deletion sources/updater/update_metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_plain = "1"
snafu = "0.7"
toml = "0.5"
toml = "0.7"

[lib]
name = "update_metadata"
Expand Down
2 changes: 1 addition & 1 deletion sources/updater/updog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ serde_plain = "1"
signpost = { path = "../signpost", version = "0.1" }
simplelog = "0.12"
snafu = "0.7"
toml = "0.5"
toml = "0.7"
tough = { version = "0.14", features = ["http"] }
update_metadata = { path = "../update_metadata", version = "0.1" }
url = "2"
Expand Down
Loading
Loading