Skip to content

Commit

Permalink
treewide: use workspace dependencies (near#8822)
Browse files Browse the repository at this point in the history
Promised follow-up of near#8792. I migrated one crate per commit at the beginning, and when most crates did not lead to changes in the root-level Cargo.toml started migrating a few at once. Would recommend commit-by-commit review as I checked that cargo resolution didn’t change after each commit.

Given the bitrot potential I’m marking as automerge right now.
  • Loading branch information
Ekleog-NEAR authored and nikurt committed Apr 5, 2023
1 parent b3e20e6 commit 881206a
Show file tree
Hide file tree
Showing 72 changed files with 605 additions and 528 deletions.
94 changes: 90 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ async-recursion = "0.3.2"
async-trait = "0.1.58"
atty = "0.2"
awc = { version = "3", features = ["openssl"] }
backtrace = "0.3"
base64 = "0.13"
bencher = "0.1.5"
bitflags = "1.2"
Expand All @@ -105,7 +106,8 @@ bytes = "1"
bytesize = { version = "1.1", features = ["serde"] }
c2-chacha = "0.3"
cargo_metadata = "0.14.1"
cfg-if = "1"
cc = "1.0"
cfg-if = "1.0"
chrono = { version = "0.4.19", features = ["serde"] }
clap = { version = "3.1.6", features = ["derive", "env"] }
conqueue = "0.4.0"
Expand All @@ -115,38 +117,101 @@ crossbeam = "0.8"
crossbeam-channel = "0.5"
csv = "1.1.1"
curve25519-dalek = "3"
delay-detector = { path = "tools/delay-detector" }
derive-enum-from-into = "0.1.1"
derive_more = "0.99.9"
dirs = "4"
dynasm = "1.0"
dynasmrt = "1.0"
easy-ext = "0.2"
ed25519-dalek = "1"
elastic-array = "0.11"
enum-map = "2.1.0"
enumset = "1.0"
expect-test = "1.3.0"
finite-wasm = "0.3.0"
flate2 = "1.0.22"
fs2 = "0.4"
futures = "0.3.5"
futures-util = "0.3"
genesis-populate = { path = "genesis-tools/genesis-populate"}
hashbrown = "0.11"
hex = { version = "0.4.2", features = ["serde"] }
hex-literal = "0.2"
hkdf = "0.12.3"
hyper = { version = "0.14", features = ["full"] }
hyper-tls = "0.5.0"
im = "15"
indexmap = "1.6"
indicatif = { version = "0.15.0", features = ["with_rayon"] }
insta = { version = "1.26.0", features = ["json", "yaml"] }
integration-tests = { path = "integration-tests" }
itertools = "0.10.0"
itoa = "1.0"
json_comments = "0.2.1"
lazy_static = "1.4"
leb128 = "0.2"
libc = "0.2.81"
libfuzzer-sys = { version = "0.4", features = ["arbitrary-derive"] }
log = "0.4"
loupe = "0.1"
lru = "0.7.2"
memmap2 = "0.5"
memoffset = "0.6"
more-asserts = "0.2"
near-account-id = { path = "core/account-id", features = [ "internal_unstable" ] }
near-actix-test-utils = { path = "test-utils/actix-test-utils" }
near-amend-genesis = { path = "tools/amend-genesis" }
near-async = { path = "core/async" }
near-cache = { path = "utils/near-cache" }
near-chain = { path = "chain/chain" }
near-chain-configs = { path = "core/chain-configs" }
near-chain-primitives = { path = "chain/chain-primitives" }
near-chunks = { path = "chain/chunks" }
near-chunks-primitives = { path = "chain/chunks-primitives" }
near-client = { path = "chain/client" }
near-client-primitives = {path = "chain/client-primitives"}
near-cold-store-tool = { path = "tools/cold-store", package = "cold-store-tool" }
near-config-utils = { path = "utils/config" }
near-crypto = { path = "core/crypto" }
near-dyn-configs = { path = "core/dyn-configs" }
near-epoch-manager = { path = "chain/epoch-manager" }
near-flat-storage = { path = "tools/flat-storage" }
near-indexer = { path = "chain/indexer" }
near-indexer-primitives = { path = "chain/indexer-primitives" }
near-jsonrpc = { path = "chain/jsonrpc" }
near-jsonrpc-adversarial-primitives = { path = "chain/jsonrpc-adversarial-primitives" }
near-jsonrpc-client = { path = "chain/jsonrpc/client" }
near-jsonrpc-primitives = { path = "chain/jsonrpc-primitives", features = ["full"] }
near-jsonrpc-tests = { path = "chain/jsonrpc/jsonrpc-tests" }
near-mainnet-res = { path = "utils/mainnet-res" }
near-mirror = { path = "tools/mirror" }
near-network = { path = "chain/network" }
near-o11y = { path = "core/o11y" }
near-performance-metrics = { path = "utils/near-performance-metrics" }
near-performance-metrics-macros = { path = "utils/near-performance-metrics-macros" }
near-ping = { path = "tools/ping" }
near-pool = { path = "chain/pool" }
near-primitives = { path = "core/primitives" }
near-primitives-core = { path = "core/primitives-core" }
near-rosetta-rpc = { path = "chain/rosetta-rpc" }
near-rpc-error-core = { path = "tools/rpctypegen/core" }
near-rpc-error-macro = { path = "tools/rpctypegen/macro" }
near-stable-hasher = { path = "utils/near-stable-hasher" }
near-state-parts = { path = "tools/state-parts" }
near-state-viewer = { path = "tools/state-viewer", package = "state-viewer" }
near-store = { path = "core/store" }
near-telemetry = { path = "chain/telemetry" }
near-test-contracts = { path = "runtime/near-test-contracts" }
near-vm-errors = { path = "runtime/near-vm-errors" }
near-vm-logic = {path = "runtime/near-vm-logic" }
near-vm-runner = { path = "runtime/near-vm-runner"}
nearcore = { path = "nearcore" }
nix = "0.24"
node-runtime = { path = "runtime/runtime" }
num-bigint = "0.3"
num-rational = { version = "0.3.1", features = ["serde"] }
num-traits = "0.2.12"
num-traits = "0.2.15"
num_cpus = "1.11"
once_cell = "1.13.1"
openssl = { version = "0.10", features = ["vendored"] }
Expand All @@ -159,11 +224,14 @@ parity-wasm = { version = "0.42", default-features = false }
parity-wasm_41 = { package = "parity-wasm", version = "0.41" }
parking_lot = "0.12.1"
pin-project = "1.0"
prefix-sum-vec = "0.1.2"
pretty_assertions = "1.2"
primitive-types = { version = "0.10", default-features = false }
proc-macro2 = "1"
prometheus = "0.13.1"
protobuf = "3.0.1"
protobuf-codegen = "3.0.1"
pwasm-utils_12 = { package = "pwasm-utils", version = "0.12" }
quote = "1.0"
rand = "0.8.5"
rand_chacha = "0.3.1"
Expand All @@ -174,11 +242,15 @@ rayon = "1.5"
redis = "0.21.5"
reed-solomon-erasure = "4"
regex = "1.7.1"
region = "3.0"
reqwest = { version = "0.11.0", features = ["blocking"] }
ripemd = "0.1.1"
rkyv = "0.7.31"
rlimit = "0.7"
rocksdb = { version = "0.19.0", default-features = false, features = ["snappy", "lz4", "zstd", "zlib", "jemalloc"] }
runtime-tester = { path = "test-utils/runtime-tester" }
rust-s3 = { version = "0.32.3", features = ["blocking"] }
rustc-demangle = "0.1"
rusqlite = {version = "0.27.0", features = ["bundled", "chrono", "functions"] }
secp256k1 = { version = "0.24", features = ["recovery", "rand-std"] }
semver = "1.0.4"
Expand All @@ -190,6 +262,7 @@ serde_yaml = "0.9"
sha2 = "0.10"
sha3 = "0.10"
shell-escape = "0.1.5"
smallvec = "1.6"
smart-default = "0.6"
smartstring = "1.0.1"
strum = { version = "0.24", features = ["derive"] }
Expand All @@ -198,29 +271,42 @@ subtle = "2.2"
syn = { version = "1.0.54", features = ["extra-traits", "full"] }
sysinfo = "0.24.5"
tar = "0.4.38"
target-lexicon = { version = "0.12.2", default-features = false }
tempfile = "3.3"
testlib = { path = "test-utils/testlib" }
thiserror = "1.0.30"
tikv-jemallocator = "0.5.0"
time = "0.3.9"
tokio = { version = "~1.19", features = ["fs", "macros", "net", "rt-multi-thread", "sync", "time"] }
tokio-stream = { version = "0.1.2", features = ["net"] }
tokio-util = { version = "0.7.1", features = ["codec", "io"] }
toml = "0.5.8"
tqdm = "0.4.4"
tracing = { version = "0.1.36", features = ["std"] }
tracing-appender = "0.2.2"
tracing-opentelemetry = "0.17.0"
tracing-span-tree = "0.1"
tracing-subscriber = { version = "0.3.15", features = ["env-filter", "fmt", "registry", "std"] }
trybuild = "1.0.11"
turn = "0.6"
validator = "0.12"
rkyv = { version = "0.7", features = ["strict"] }
wasm-encoder = "0.11.0"
wasm-smith = "0.10"
wasmparser = "0.78"
wasmer-compiler = { package = "wasmer-compiler-near", version = "=2.4.0" }
wasmer-compiler-singlepass = { package = "wasmer-compiler-singlepass-near", version = "=2.4.0" }
wasmer-engine = { package = "wasmer-engine-near", version = "=2.4.0" }
wasmer-engine-universal = { package = "wasmer-engine-universal-near", version = "=2.4.0", features = ["compiler"] }
wasmer-runtime = { version = "0.18.0", package = "wasmer-runtime-near", features = ["default-backend-singlepass"], default-features = false }
wasmer-runtime-core = { version = "0.18.2", package = "wasmer-runtime-core-near" }
wasmer-types = { package = "wasmer-types-near", version = "=2.4.0" }
wasmer-vm = { package = "wasmer-vm-near", version = "=2.4.0" }
wasmparser = "0.78" # TODO: unify at least the versions of wasmparser we have in our codebase
wasmprinter = "0.2"
wasmtime = { version = "4.0.0", default-features = false, features = ["cranelift"] }
wast = "40.0"
wat = "1.0.40"
webrtc-util = "0.7"
winapi = { version = "0.3", features = ["winbase", "memoryapi", "errhandlingapi", "winnt", "impl-default"] }
xshell = "0.2.1"
xz2 = "0.1.6"

Expand Down
4 changes: 2 additions & 2 deletions chain/chain-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ chrono.workspace = true
thiserror.workspace = true
tracing.workspace = true

near-primitives = { path = "../../core/primitives" }
near-crypto = { path = "../../core/crypto" }
near-primitives.workspace = true
near-crypto.workspace = true
22 changes: 11 additions & 11 deletions chain/chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ strum.workspace = true
thiserror.workspace = true
tracing.workspace = true

delay-detector = { path = "../../tools/delay-detector"}
near-chain-configs = { path = "../../core/chain-configs" }
near-chain-primitives = { path = "../chain-primitives" }
near-crypto = { path = "../../core/crypto" }
near-o11y = { path = "../../core/o11y" }
near-pool = { path = "../pool" }
near-primitives = { path = "../../core/primitives" }
near-store = { path = "../../core/store" }
near-cache = { path = "../../utils/near-cache" }
near-client-primitives = { path = "../client-primitives"}
near-epoch-manager = { path = "../epoch-manager" }
delay-detector.workspace = true
near-chain-configs.workspace = true
near-chain-primitives.workspace = true
near-crypto.workspace = true
near-o11y.workspace = true
near-pool.workspace = true
near-primitives.workspace = true
near-store.workspace = true
near-cache.workspace = true
near-client-primitives.workspace = true
near-epoch-manager.workspace = true

[dev-dependencies]
insta.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions chain/chunks-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ repository = "https://github.com/near/nearcore"
description = "This crate hosts NEAR chunks-related error types"

[dependencies]
near-chain-primitives = { path = "../chain-primitives" }
near-primitives = { path = "../../core/primitives" }
near-chain-primitives.workspace = true
near-primitives.workspace = true
20 changes: 10 additions & 10 deletions chain/chunks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ reed-solomon-erasure.workspace = true
time.workspace = true
tracing.workspace = true

near-async = { path = "../../core/async" }
near-crypto = { path = "../../core/crypto" }
near-primitives = { path = "../../core/primitives" }
near-chunks-primitives = { path = "../chunks-primitives" }
near-store = { path = "../../core/store" }
near-network = { path = "../network" }
near-o11y = { path = "../../core/o11y" }
near-chain = { path = "../chain" }
near-pool = { path = "../pool" }
near-performance-metrics = { path = "../../utils/near-performance-metrics" }
near-async.workspace = true
near-crypto.workspace = true
near-primitives.workspace = true
near-chunks-primitives.workspace = true
near-store.workspace = true
near-network.workspace = true
near-o11y.workspace = true
near-chain.workspace = true
near-pool.workspace = true
near-performance-metrics.workspace = true

[dev-dependencies]
assert_matches.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions chain/client-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ serde_json.workspace = true
strum.workspace = true
thiserror.workspace = true

near-chain-primitives = { path = "../chain-primitives" }
near-chain-configs = { path = "../../core/chain-configs" }
near-chain-primitives.workspace = true
near-chain-configs.workspace = true

near-chunks-primitives = { path = "../chunks-primitives" }
near-crypto = { path = "../../core/crypto" }
near-primitives = { path = "../../core/primitives" }
near-chunks-primitives.workspace = true
near-crypto.workspace = true
near-primitives.workspace = true

[features]
sandbox = []
38 changes: 19 additions & 19 deletions chain/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ thiserror.workspace = true
tokio.workspace = true
tracing.workspace = true

near-async = { path = "../../core/async" }
near-chain-primitives = { path = "../chain-primitives" }
near-crypto = { path = "../../core/crypto" }
near-primitives = { path = "../../core/primitives" }
near-store = { path = "../../core/store" }
near-chain-configs = { path = "../../core/chain-configs" }
near-chain = { path = "../chain" }
near-client-primitives = { path = "../client-primitives" }
near-dyn-configs = { path = "../../core/dyn-configs" }
near-network = { path = "../network" }
near-pool = { path = "../pool" }
near-chunks = { path = "../chunks" }
near-telemetry = { path = "../telemetry" }
near-o11y = { path = "../../core/o11y" }
near-performance-metrics = { path = "../../utils/near-performance-metrics" }
near-performance-metrics-macros = { path = "../../utils/near-performance-metrics-macros" }
near-epoch-manager = { path = "../epoch-manager" }
delay-detector = { path = "../../tools/delay-detector" }
near-async.workspace = true
near-chain-primitives.workspace = true
near-crypto.workspace = true
near-primitives.workspace = true
near-store.workspace = true
near-chain-configs.workspace = true
near-chain.workspace = true
near-client-primitives.workspace = true
near-dyn-configs.workspace = true
near-network.workspace = true
near-pool.workspace = true
near-chunks.workspace = true
near-telemetry.workspace = true
near-o11y.workspace = true
near-performance-metrics.workspace = true
near-performance-metrics-macros.workspace = true
near-epoch-manager.workspace = true
delay-detector.workspace = true

[dev-dependencies]
assert_matches.workspace = true
near-actix-test-utils = { path = "../../test-utils/actix-test-utils" }
near-actix-test-utils.workspace = true

[features]
# if enabled, we assert in most situations that are impossible unless some byzantine behavior is observed.
Expand Down
12 changes: 6 additions & 6 deletions chain/epoch-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ serde_json.workspace = true
smart-default.workspace = true
tracing.workspace = true

near-crypto = { path = "../../core/crypto" }
near-primitives = { path = "../../core/primitives" }
near-store = { path = "../../core/store" }
near-chain-configs = { path = "../../core/chain-configs" }
near-chain-primitives = { path = "../chain-primitives" }
near-cache = { path = "../../utils/near-cache" }
near-crypto.workspace = true
near-primitives.workspace = true
near-store.workspace = true
near-chain-configs.workspace = true
near-chain-primitives.workspace = true
near-cache.workspace = true

[features]
expensive_tests = []
Expand Down
2 changes: 1 addition & 1 deletion chain/indexer-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ description = "This crate hosts structures for the NEAR Indexer Framework types"
serde.workspace = true
serde_json.workspace = true

near-primitives = { path = "../../core/primitives" }
near-primitives.workspace = true
20 changes: 10 additions & 10 deletions chain/indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ serde_json.workspace = true
tokio.workspace = true
tracing.workspace = true

nearcore = { path = "../../nearcore" }
near-client = { path = "../client" }
near-chain-configs = { path = "../../core/chain-configs" }
near-dyn-configs = { path = "../../core/dyn-configs" }
near-crypto = { path = "../../core/crypto" }
near-indexer-primitives = { path = "../indexer-primitives" }
near-o11y = { path = "../../core/o11y" }
near-primitives = { path = "../../core/primitives" }
near-store = { path = "../../core/store" }
node-runtime = { path = "../../runtime/runtime" }
nearcore.workspace = true
near-client.workspace = true
near-chain-configs.workspace = true
near-dyn-configs.workspace = true
near-crypto.workspace = true
near-indexer-primitives.workspace = true
near-o11y.workspace = true
near-primitives.workspace = true
near-store.workspace = true
node-runtime.workspace = true

[features]
calimero_zero_storage = ["near-primitives/calimero_zero_storage"]
Expand Down
Loading

0 comments on commit 881206a

Please sign in to comment.