Skip to content

Commit

Permalink
fix: udpate crates where its possible to remove duplicates add more c…
Browse files Browse the repository at this point in the history
…ases
  • Loading branch information
willemneal authored and gitbutler-client committed Nov 12, 2024
1 parent 804d9d0 commit 0e97c3f
Show file tree
Hide file tree
Showing 14 changed files with 145 additions and 448 deletions.
515 changes: 101 additions & 414 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ tracing = "0.1.37"
tracing-subscriber = "0.3.16"
tracing-appender = "0.2.2"
which = "4.4.0"
wasmparser = "0.90.0"
wasmparser = "0.116.1"
directories = "5.0.1"
ulid = "1.1"
termcolor = "1.1.3"
Expand All @@ -100,7 +100,11 @@ ed25519-dalek = ">= 2.1.1"
http = "1.0.0"
jsonrpsee-http-client = "0.20.1"
jsonrpsee-core = "0.20.1"
tokio = "1.28.1"
walkdir = "2.5.0"
toml_edit = "0.22.20"
toml = "0.8.19"
reqwest = "0.12.7"
predicates = "3.1.2"

[profile.test-wasms]
inherits = "release"
Expand Down
4 changes: 2 additions & 2 deletions cmd/crates/soroban-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ thiserror = "1.0.31"
sha2 = "0.10.6"
assert_cmd = "2.0.4"
assert_fs = "1.0.7"
predicates = "2.1.5"
predicates = { workspace = true }
fs_extra = "1.3.0"
toml = "0.8.10"
toml = { workspace = true }


[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]
doctest = false

[dependencies]
soroban-sdk = { version = "=21.7.2" }
soroban-sdk = { workspace = true }

[dev-dependencies]
soroban-sdk = { version = "=21.7.2", features = ["testutils"]}
soroban-sdk = { workspace = true, features = ["testutils"]}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib", "rlib"]
doctest = false

[dependencies]
soroban-sdk = { version = "=21.7.2" }
soroban-sdk = { workspace = true }

[dev-dependencies]
soroban-sdk = { version = "=21.7.2", features = ["testutils"]}
soroban-sdk = { workspace = true, features = ["testutils"]}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib", "rlib"]
doctest = false

[dependencies]
soroban-sdk = { version = "=21.7.2" }
soroban-sdk = { workspace = true }

[dev-dependencies]
soroban-sdk = { version = "=21.7.2", features = ["testutils"]}
soroban-sdk = { workspace = true, features = ["testutils"]}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]
doctest = false

[dependencies]
soroban-sdk = { version = "=21.7.2" }
soroban-sdk = { workspace = true }

[dev-dependencies]
soroban-sdk = { version = "=21.7.2", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ rust-version.workspace = true
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=21.7.2" }
soroban-token-sdk = { version = "=21.7.2" }
soroban-sdk = { workspace = true }
soroban-token-sdk = { workspace = true }

[dev-dependencies]
soroban-sdk = { version = "=21.7.2", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]
doctest = false

[dependencies]
soroban-sdk = { version = "=21.7.2" }
soroban-sdk = { workspace = true }

[dev-dependencies]
soroban-sdk = { version = "=21.7.2" , features = ["testutils"]}
soroban-sdk = { workspace = true , features = ["testutils"]}
4 changes: 2 additions & 2 deletions cmd/crates/stellar-ledger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ thiserror = "1.0.32"
serde = "1.0.82"
serde_derive = "1.0.82"
serde_json = "1.0.82"
sha2 = "0.9.9"
sha2 = { workspace = true }
ed25519-dalek = { workspace = true }
stellar-strkey = { workspace = true }
ledger-transport-hid = "0.10.0"
Expand All @@ -34,7 +34,7 @@ byteorder = "1.5.0"
bollard = { workspace = true }
home = "0.5.9"
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.11", features = ["json"] }
reqwest = { workspace = true, features = ["json"] }
soroban-rpc.workspace = true
phf = { version = "0.11.2", features = ["macros"] }
futures = "0.3.30"
Expand Down
13 changes: 6 additions & 7 deletions cmd/soroban-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,17 @@ reqwest = { version = "0.12.7", default-features = false, features = [
jsonrpsee-http-client = "0.20.1"
jsonrpsee-core = "0.20.1"
regex = "1.6.0"
wasm-opt = { version = "0.114.0", optional = true }
wasm-opt = { version = "0.116.1", optional = true }
chrono = { version = "0.4.27", features = ["serde"] }
rpassword = "7.2.0"
dirs = "4.0.0"
toml = "0.5.9"
toml = { workspace = true }
itertools = "0.10.5"
shlex = "1.1.0"
sep5 = { workspace = true }
ethnum = { workspace = true }
clap-markdown = { version = "0.1.4", optional = true }
which = { workspace = true, features = ["regex"] }
strsim = "0.10.0"
strsim = "0.11.1"
heck = "0.5.0"
tracing = { workspace = true }
tracing-appender = { workspace = true }
Expand All @@ -109,7 +108,7 @@ strum_macros = "0.17.1"
async-compression = { version = "0.4.12", features = ["tokio", "gzip"] }
shell-escape = "0.1.5"
tempfile = "3.8.1"
toml_edit = "0.21.0"
toml_edit = { workspace = true }
rust-embed = { version = "8.2.0", features = ["debug-embed"] }
bollard = { workspace = true }
futures-util = "0.3.30"
Expand All @@ -127,14 +126,14 @@ url = "2.5.2"
wasm-gen = "0.1.4"

[build-dependencies]
crate-git-revision = "0.0.4"
crate-git-revision = "0.0.6"
serde.workspace = true
thiserror.workspace = true


[dev-dependencies]
assert_cmd = "2.0.4"
assert_fs = "1.0.7"
predicates = "2.1.5"
predicates = { workspace = true }
walkdir = "2.5.0"
mockito = "1.5.0"
9 changes: 5 additions & 4 deletions cmd/soroban-cli/src/config/locator.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use clap::arg;
use directories::{ProjectDirs, UserDirs};
use itertools::Itertools;
use serde::de::DeserializeOwned;
use std::{
Expand Down Expand Up @@ -414,11 +415,10 @@ impl KeyType {
}

pub fn read_from_path<T: DeserializeOwned>(path: &Path) -> Result<T, Error> {
let data = fs::read(path).map_err(|_| Error::NetworkFileRead {
let data = fs::read_to_string(path).map_err(|_| Error::NetworkFileRead {
path: path.to_path_buf(),
})?;
let res = toml::from_slice(data.as_slice());
Ok(res?)
Ok(toml::from_str(&data)?)
}

pub fn read_with_global<T: DeserializeOwned>(&self, key: &str, pwd: &Path) -> Result<T, Error> {
Expand Down Expand Up @@ -489,8 +489,9 @@ pub fn global_config_path() -> Result<PathBuf, Error> {
let config_dir = if let Ok(config_home) = std::env::var("XDG_CONFIG_HOME") {
PathBuf::from_str(&config_home).map_err(|_| Error::XdgConfigHome(config_home))?
} else {
dirs::home_dir()
UserDirs::new()
.ok_or(Error::HomeDirNotFound)?
.home_dir()
.join(".config")
};

Expand Down
5 changes: 2 additions & 3 deletions cmd/soroban-cli/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,8 @@ impl Config {
let path = locator::config_file()?;

if path.exists() {
let data = fs::read(&path).map_err(|_| locator::Error::FileRead { path })?;

Ok(toml::from_slice(&data)?)
let data = fs::read_to_string(&path).map_err(|_| locator::Error::FileRead { path })?;
Ok(toml::from_str(&data)?)
} else {
Ok(Config::default())
}
Expand Down
9 changes: 8 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ deny = [
# Certain crates/versions that will be skipped when doing duplicate detection.
skip = [

# requires using slipped10
{ crate = "curve25519-dalek", version = "4.1.3" , reason = "requires using slipped10" },
{ crate = "ed25519", version = "2.2.3", reason = "requires using slipped10" },
{ crate = "ed25519-dalek", version = "2.1.1", reason = "requires using slipped10" },
{ crate = "signature", version = "2.1.0", reason = "requires using slipped10" },
{ crate = "rand_core", version = "0.6.4", reason = "requires using slipped10" },

# Requires updating slipped10 to newest sha2 others are dependents that will be updated
{ crate = "sha2", reason = "temporary duplicate until upstream updates" },
{ crate = "digest", reason = "temporary duplicate until upstream updates" },
Expand Down Expand Up @@ -284,7 +291,7 @@ skip = [
{ crate = "tokio-rustls", reason = "temporary duplicate until upstream updates" },

# wasm-opt
{ crate = "heck", reason = "wasm-opt needs to update to 0.5"},
{ crate = "heck", reason = "wasm-opt needs to update to 0.5", version = "0.5.0"},
{ crate = "strum", reason = "wasm-opt needs to update", version = "0.26.3" },
{ crate = "strum_macros", reason = "wasm-opt needs to update", version = "0.26.4" },

Expand Down

0 comments on commit 0e97c3f

Please sign in to comment.