Skip to content

Commit

Permalink
Unpin all non-stellar dependencies (#1441)
Browse files Browse the repository at this point in the history
### What
Unpin all non-stellar dependencies.

### Why
We have had reports that the libs are difficult to integrate into other
projects due to the rigid dependency requirements.

We ultimately need the dependencies to be pinned in stellar-core.

There's benefit to the tests in this repo running with the same
dependencies as what core pins to.

There's benefits to stellar-rpc also using the same dependencies so as
to decrease the chance that simulation runs with different behavior.
Also, the same applies to the SDK for test behavior.

Pinning the deps were an easy way to keep the dependencies consistent
everywhere, but it also makes it difficult for folks to use the env
libraries.

Close #1351

### Other things that need to happen

@graydon is making a tool to check that Cargo.lock files are using
consistent versions where possible across the env repo, core repo, and
we can also use that in the rpc repo. It won't be practical to expect
contract devs to use it on their contract projects, so contract devs
will be able to use whatever combination of dependencies and that's just
a limitation.

### Why not

We could say again that not doing this has greater benefits than
allowing folks to more easily use the libraries in their own projects.

(cherry picked from commit a54d997)
  • Loading branch information
leighmcculloch committed Aug 20, 2024
1 parent c67a168 commit e44506e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 60 deletions.
8 changes: 4 additions & 4 deletions soroban-builtin-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ rust-version.workspace = true
proc-macro = true

[dependencies]
syn = {version="=2.0.39",features=["full"]}
quote = "=1.0.33"
proc-macro2 = "=1.0.69"
itertools = "=0.11.0"
syn = {version="2.0.39",features=["full"]}
quote = "1.0.33"
proc-macro2 = "1.0.69"
itertools = "0.11.0"

[package.metadata.docs.rs]
all-features = true
20 changes: 10 additions & 10 deletions soroban-env-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ edition = "2021"
rust-version.workspace = true

[build_dependencies]
crate-git-revision = "=0.0.6"
crate-git-revision = "0.0.6"

[dependencies]
soroban-env-macros = { workspace = true }
stellar-xdr = { workspace = true, default-features = false, features = [ "curr" ] }
wasmi = { workspace = true, optional = true }
wasmparser = { workspace = true, optional = true}
serde = { version = "=1.0.192", features = ["derive"], optional = true }
static_assertions = "=1.1.0"
ethnum = "=1.5.0"
arbitrary = { version = "=1.3.2", features = ["derive"], optional = true }
num-traits = {version = "=0.2.17", default-features = false}
num-derive = "=0.4.1"
serde = { version = "1.0.192", features = ["derive"], optional = true }
static_assertions = "1.1.0"
ethnum = "1.5.0"
arbitrary = { version = "1.3.2", features = ["derive"], optional = true }
num-traits = {version = "0.2.17", default-features = false}
num-derive = "0.4.1"

[target.'cfg(not(target_family = "wasm"))'.dependencies]
tracy-client = { version = "=0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true }
tracy-client = { version = "0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true }

[dev-dependencies]
num_enum = "=0.7.1"
num-traits = "=0.2.17"
num_enum = "0.7.1"
num-traits = "0.2.17"

[features]
std = ["stellar-xdr/std", "stellar-xdr/base64"]
Expand Down
74 changes: 37 additions & 37 deletions soroban-env-host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ soroban-builtin-sdk-macros = { workspace = true }
soroban-env-common = { workspace = true, features = ["std", "wasmi", "shallow-val-hash"] }
wasmi = { workspace = true }
wasmparser = { workspace = true }
stellar-strkey = "=0.0.8"
static_assertions = "=1.1.0"
sha2 = "=0.10.8"
hex-literal = "=0.4.1"
hmac = "=0.12.1"
stellar-strkey = "0.0.8"
static_assertions = "1.1.0"
sha2 = "0.10.8"
hex-literal = "0.4.1"
hmac = "0.12.1"
# NB: We'll need to pin this again after switching the Core to the new env version.
ed25519-dalek = {version = ">=2.0.0", features = ["rand_core"] }
# NB: this must match the same rand version used by ed25519-dalek above
rand = "=0.8.5"
rand = "0.8.5"
# NB: this must match the same rand_chacha version used by ed25519-dalek above
rand_chacha = "=0.3.1"
num-traits = "=0.2.17"
num-integer = "=0.1.45"
num-derive = "=0.4.1"
backtrace = { version = "=0.3.69", optional = true }
k256 = {version = "=0.13.1", default-features = false, features = ["ecdsa", "arithmetic"]}
p256 = {version = "=0.13.2", default-features = false, features = ["ecdsa", "arithmetic"]}
ecdsa = {version = "=0.16.7", default-features = false}
sec1 = {version = "=0.7.2"}
rand_chacha = "0.3.1"
num-traits = "0.2.17"
num-integer = "0.1.45"
num-derive = "0.4.1"
backtrace = { version = "0.3.69", optional = true }
k256 = {version = "0.13.1", default-features = false, features = ["ecdsa", "arithmetic"]}
p256 = {version = "0.13.2", default-features = false, features = ["ecdsa", "arithmetic"]}
ecdsa = {version = "0.16.7", default-features = false}
sec1 = {version = "0.7.2"}
elliptic-curve ={ version = "0.13.5", default-features = false}
generic-array ={ version = "0.14.7"}
# NB: getrandom is a transitive dependency of k256 which we're not using directly
# but we have to specify it here in order to enable its 'js' feature which
# is needed to build the host for wasm (a rare but supported config).
getrandom = { version = "=0.2.11", features=["js"] }
sha3 = "=0.10.8"
getrandom = { version = "0.2.11", features=["js"] }
sha3 = "0.10.8"
# NB: this must match the same curve25519-dalek version used by ed25519-dalek
# above used only for calibration
#
Expand All @@ -69,33 +69,33 @@ sha3 = "=0.10.8"
curve25519-dalek = { version = ">=4.1.1", default-features = false, features = ["digest"]}

[target.'cfg(not(target_family = "wasm"))'.dependencies]
tracy-client = { version = "=0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true }
tracy-client = { version = "0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true }

[dev-dependencies]
hex = "=0.4.3"
itertools = "=0.11.0"
tabwriter = "=1.3.0"
thousands = "=0.2.0"
hex = "0.4.3"
itertools = "0.11.0"
tabwriter = "1.3.0"
thousands = "0.2.0"
soroban-env-macros = { workspace = true }
soroban-test-wasms = { package = "soroban-test-wasms", path = "../soroban-test-wasms" }
soroban-synth-wasm = { package = "soroban-synth-wasm", path = "../soroban-synth-wasm", features = ["adversarial"]}
soroban-bench-utils = { package = "soroban-bench-utils", path = "../soroban-bench-utils" }
bytes-lit = "=0.0.5"
textplots = "=0.8.4"
wasmprinter = "=0.2.72"
expect-test = "=1.4.1"
more-asserts = "=0.3.1"
pretty_assertions = "=1.4.0"
backtrace = "=0.3.69"
serde_json = "=1.0.108"
arbitrary = "=1.3.2"
lstsq = "=0.5.0"
nalgebra = { version = "=0.32.3", default-features = false, features = ["std"]}
wasm-encoder = "=0.36.2"
bytes-lit = "0.0.5"
textplots = "0.8.4"
wasmprinter = "0.2.72"
expect-test = "1.4.1"
more-asserts = "0.3.1"
pretty_assertions = "1.4.0"
backtrace = "0.3.69"
serde_json = "1.0.108"
arbitrary = "1.3.2"
lstsq = "0.5.0"
nalgebra = { version = "0.32.3", default-features = false, features = ["std"]}
wasm-encoder = "0.36.2"
rustversion = "1.0"
wycheproof = "=0.5.1"
k256 = {version = "=0.13.1", default-features = false, features = ["alloc"]}
p256 = {version = "=0.13.2", default-features = false, features = ["alloc"]}
wycheproof = "0.5.1"
k256 = {version = "0.13.1", default-features = false, features = ["alloc"]}
p256 = {version = "0.13.2", default-features = false, features = ["alloc"]}

[dev-dependencies.stellar-xdr]
version = "=21.2.0"
Expand Down
12 changes: 6 additions & 6 deletions soroban-env-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ proc-macro = true

[dependencies]
stellar-xdr = { workspace = true, features = ["curr", "std"] }
syn = {version="=2.0.39",features=["full"]}
quote = "=1.0.33"
proc-macro2 = "=1.0.69"
itertools = "=0.11.0"
serde = { version = "=1.0.192", features = ["derive"] }
serde_json = "=1.0.108"
syn = {version="2.0.39",features=["full"]}
quote = "1.0.33"
proc-macro2 = "1.0.69"
itertools = "0.11.0"
serde = { version = "1.0.192", features = ["derive"] }
serde_json = "1.0.108"

[features]
next = ["stellar-xdr/next"]
Expand Down
6 changes: 3 additions & 3 deletions soroban-synth-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ wasm-encoder = "=0.36.2"
wasmparser = { workspace = true }
soroban-env-common = { workspace = true }
stellar-xdr = { workspace = true, features = ["std"] }
arbitrary = { version = "=1.3.2", features = ["derive"] }
arbitrary = { version = "1.3.2", features = ["derive"] }
soroban-env-macros = { workspace = true }

[features]
testutils = ["soroban-env-common/testutils"]
adversarial = []

[dev-dependencies]
expect-test = "=1.4.1"
wasmprinter = "=0.2.72"
expect-test = "1.4.1"
wasmprinter = "0.2.72"

0 comments on commit e44506e

Please sign in to comment.