Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Setting versions locally towards 2.0 release #4404

Merged
merged 9 commits into from
Dec 17, 2019
Merged
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
160 changes: 80 additions & 80 deletions Cargo.lock

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions bin/node-template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ tokio = "0.1.22"
parking_lot = "0.9.0"
codec = { package = "parity-scale-codec", version = "1.0.0" }
trie-root = "0.15.2"
sp-io = { path = "../../primitives/io" }
sc-cli = { path = "../../client/cli" }
sp-core = { path = "../../primitives/core" }
sc-executor = { path = "../../client/executor" }
sc-service = { path = "../../client/service" }
sp-inherents = { path = "../../primitives/inherents" }
sc-transaction-pool = { path = "../../client/transaction-pool" }
sp-transaction-pool = { path = "../../primitives/transaction-pool" }
sc-network = { path = "../../client/network" }
sc-consensus-aura = { path = "../../client/consensus/aura" }
sp-consensus-aura = { path = "../../primitives/consensus/aura" }
sp-consensus = { path = "../../primitives/consensus/common" }
grandpa = { package = "sc-finality-grandpa", path = "../../client/finality-grandpa" }
grandpa-primitives = { package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" }
sc-client = { path = "../../client/" }
node-template-runtime = { path = "runtime" }
sp-runtime = { path = "../../primitives/runtime" }
sc-basic-authority = { path = "../../client/basic-authorship"}
sp-io = { version = "2.0.0", path = "../../primitives/io" }
Copy link
Member

Choose a reason for hiding this comment

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

why set versions as well as path? it's just redundant additional tedious data to maintain isn't it?

Copy link
Contributor Author

@gnunicorn gnunicorn Dec 17, 2019

Choose a reason for hiding this comment

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

Unfortunately, defining the version is a requirement to publish on crates.io. Cargo doesn't have any publish --all and won't resolve path to figure out which version to use–in general its publishing helper for workspaces are pretty rudimentary. On the other side path is obviously a lot easier and nicer for development.

Fortunately, because cargo uses semver this isn't much of a deal. We can just define version = "2.0.0" and even if we bump the minor or patch version of that crate to make a new release, this doesn't need any update on this crate. Cargo just will figure out the best version on cargo update (or cargo build if first time). Our internal Cargo.lock will also update without problems. This also allows us to do version updates more independently per crate, like updating network and consensus and apply the changes to the crates that follow without having to publish a breaking change on these, if those dependencies don't alter their externally perceived API.

Having both is the common way to stay sane, and is what we do in the libp2p workspace repo and common practice on other workspace repos, too.

Copy link
Member

Choose a reason for hiding this comment

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

👍

sc-cli = { version = "2.0.0", path = "../../client/cli" }
sp-core = { version = "2.0.0", path = "../../primitives/core" }
sc-executor = { version = "2.0.0", path = "../../client/executor" }
sc-service = { version = "2.0.0", path = "../../client/service" }
sp-inherents = { version = "2.0.0", path = "../../primitives/inherents" }
sc-transaction-pool = { version = "2.0.0", path = "../../client/transaction-pool" }
sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" }
sc-network = { version = "0.8", path = "../../client/network" }
sc-consensus-aura = { version = "0.8", path = "../../client/consensus/aura" }
sp-consensus-aura = { version = "0.8", path = "../../primitives/consensus/aura" }
sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" }
grandpa = { version = "2.0.0", package = "sc-finality-grandpa", path = "../../client/finality-grandpa" }
grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" }
sc-client = { version = "2.0.0", path = "../../client/" }
node-template-runtime = { version = "2.0.0", path = "runtime" }
sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
sc-basic-authority = { path = "../../client/basic-authorship" }

[build-dependencies]
vergen = "3.0.4"
build-script-utils = { package = "substrate-build-script-utils", path = "../../utils/build-script-utils" }
build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../utils/build-script-utils" }
44 changes: 22 additions & 22 deletions bin/node-template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@ authors = ["Anonymous"]
edition = "2018"

[dependencies]
aura = { package = "pallet-aura", path = "../../../frame/aura", default-features = false }
balances = { package = "pallet-balances", path = "../../../frame/balances", default-features = false }
frame-support = { path = "../../../frame/support", default-features = false }
grandpa = { package = "pallet-grandpa", path = "../../../frame/grandpa", default-features = false }
indices = { package = "pallet-indices", path = "../../../frame/indices", default-features = false }
randomness-collective-flip = { package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip", default-features = false }
sudo = { package = "pallet-sudo", path = "../../../frame/sudo", default-features = false }
system = { package = "frame-system", path = "../../../frame/system", default-features = false }
timestamp = { package = "pallet-timestamp", path = "../../../frame/timestamp", default-features = false }
transaction-payment = { package = "pallet-transaction-payment", path = "../../../frame/transaction-payment", default-features = false }
aura = { version = "2.0.0", default-features = false, package = "pallet-aura", path = "../../../frame/aura" }
balances = { version = "2.0.0", default-features = false, package = "pallet-balances", path = "../../../frame/balances" }
frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" }
grandpa = { version = "2.0.0", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" }
indices = { version = "2.0.0", default-features = false, package = "pallet-indices", path = "../../../frame/indices" }
randomness-collective-flip = { version = "2.0.0", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" }
sudo = { version = "2.0.0", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" }
system = { version = "2.0.0", default-features = false, package = "frame-system", path = "../../../frame/system" }
timestamp = { version = "2.0.0", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" }
transaction-payment = { version = "2.0.0", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" }

codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
frame-executive = { path = "../../../frame/executive", default-features = false }
frame-executive = { version = "2.0.0", default-features = false, path = "../../../frame/executive" }
safe-mix = { version = "1.0.0", default-features = false }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
sp-api = { path = "../../../primitives/api", default-features = false }
sp-api = { version = "2.0.0", default-features = false, path = "../../../primitives/api" }
sp-block-builder = { path = "../../../primitives/block-builder", default-features = false}
sp-consensus-aura = { path = "../../../primitives/consensus/aura", default-features = false }
sp-core = { path = "../../../primitives/core", default-features = false }
sp-consensus-aura = { version = "0.8", default-features = false, path = "../../../primitives/consensus/aura" }
sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" }
sp-inherents = { path = "../../../primitives/inherents", default-features = false}
sp-io = { path = "../../../primitives/io", default-features = false }
sp-offchain = { path = "../../../primitives/offchain", default-features = false }
sp-runtime = { path = "../../../primitives/runtime", default-features = false }
sp-session = { path = "../../../primitives/session", default-features = false }
sp-std = { path = "../../../primitives/std", default-features = false }
sp-transaction-pool = { path = "../../../primitives/transaction-pool", default-features = false }
sp-version = { path = "../../../primitives/version", default-features = false }
sp-io = { version = "2.0.0", default-features = false, path = "../../../primitives/io" }
sp-offchain = { version = "2.0.0", default-features = false, path = "../../../primitives/offchain" }
sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" }
sp-session = { version = "2.0.0", default-features = false, path = "../../../primitives/session" }
sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" }
sp-transaction-pool = { version = "2.0.0", default-features = false, path = "../../../primitives/transaction-pool" }
sp-version = { version = "2.0.0", default-features = false, path = "../../../primitives/version" }

[build-dependencies]
wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner", version = "1.0.4" }
wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }

[features]
default = ["std"]
Expand Down
92 changes: 46 additions & 46 deletions bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,57 +34,57 @@ rand = "0.7.2"
structopt = "0.3.3"

# primitives
sp-authority-discovery = { path = "../../../primitives/authority-discovery"}
sp-consensus-babe = { path = "../../../primitives/consensus/babe" }
grandpa-primitives = { package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
sp-core = { path = "../../../primitives/core" }
sp-runtime = { path = "../../../primitives/runtime" }
sp-timestamp = { path = "../../../primitives/timestamp", default-features = false }
sp-finality-tracker = { path = "../../../primitives/finality-tracker", default-features = false }
sp-inherents = { path = "../../../primitives/inherents" }
sp-keyring = { path = "../../../primitives/keyring" }
sp-io = { path = "../../../primitives/io" }
sp-consensus = { path = "../../../primitives/consensus/common" }
sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" }
sp-consensus-babe = { version = "0.8", path = "../../../primitives/consensus/babe" }
grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" }
sp-io = { version = "2.0.0", path = "../../../primitives/io" }
sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" }

# client dependencies
sc-client-api = { path = "../../../client/api" }
sc-client = { path = "../../../client/" }
sc-chain-spec = { path = "../../../client/chain-spec" }
sc-transaction-pool = { path = "../../../client/transaction-pool" }
sp-transaction-pool = { path = "../../../primitives/transaction-pool" }
sc-network = { path = "../../../client/network" }
sc-consensus-babe = { path = "../../../client/consensus/babe" }
grandpa = { package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
sc-client-db = { path = "../../../client/db", default-features = false }
sc-offchain = { path = "../../../client/offchain" }
sc-rpc = { path = "../../../client/rpc" }
sc-basic-authority = { path = "../../../client/basic-authorship" }
sc-service = { path = "../../../client/service", default-features = false }
sc-telemetry = { path = "../../../client/telemetry" }
sc-authority-discovery = { path = "../../../client/authority-discovery"}
sc-client-api = { version = "2.0.0", path = "../../../client/api" }
sc-client = { version = "2.0.0", path = "../../../client/" }
sc-chain-spec = { version = "2.0.0", path = "../../../client/chain-spec" }
sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" }
sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
sc-network = { version = "0.8", path = "../../../client/network" }
sc-consensus-babe = { version = "0.8", path = "../../../client/consensus/babe" }
grandpa = { version = "2.0.0", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
sc-client-db = { version = "2.0.0", default-features = false, path = "../../../client/db" }
sc-offchain = { version = "2.0.0", path = "../../../client/offchain" }
sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
sc-basic-authority = { version = "2.0.0", path = "../../../client/basic-authorship" }
sc-service = { version = "2.0.0", default-features = false, path = "../../../client/service" }
sc-telemetry = { version = "2.0.0", path = "../../../client/telemetry" }
sc-authority-discovery = { version = "2.0.0", path = "../../../client/authority-discovery" }

# frame dependencies
pallet-indices = { path = "../../../frame/indices" }
pallet-timestamp = { path = "../../../frame/timestamp", default-features = false }
pallet-contracts = { path = "../../../frame/contracts" }
frame-system = { path = "../../../frame/system" }
pallet-balances = { path = "../../../frame/balances" }
pallet-transaction-payment = { path = "../../../frame/transaction-payment" }
frame-support = { path = "../../../frame/support", default-features = false }
pallet-im-online = { path = "../../../frame/im-online", default-features = false }
pallet-authority-discovery = { path = "../../../frame/authority-discovery"}
pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
pallet-timestamp = { version = "2.0.0", default-features = false, path = "../../../frame/timestamp" }
pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
frame-system = { version = "2.0.0", path = "../../../frame/system" }
pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" }
pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" }
pallet-authority-discovery = { version = "2.0.0", path = "../../../frame/authority-discovery" }

# node-specific dependencies
node-runtime = { path = "../runtime" }
node-rpc = { path = "../rpc" }
node-primitives = { path = "../primitives" }
node-executor = { path = "../executor" }
node-runtime = { version = "2.0.0", path = "../runtime" }
node-rpc = { version = "2.0.0", path = "../rpc" }
node-primitives = { version = "2.0.0", path = "../primitives" }
node-executor = { version = "2.0.0", path = "../executor" }

# CLI-specific dependencies
tokio = { version = "0.1.22", optional = true }
sc-cli = { path = "../../../client/cli", optional = true }
sc-cli = { version = "2.0.0", optional = true, path = "../../../client/cli" }
ctrlc = { version = "3.1.3", features = ["termination"], optional = true }
node-transaction-factory = { path = "../transaction-factory", optional = true }
node-transaction-factory = { version = "2.0.0", optional = true, path = "../transaction-factory" }

# WASM-specific dependencies
libp2p = { version = "0.13.0", default-features = false, optional = true }
Expand All @@ -98,15 +98,15 @@ kvdb-memorydb = { version = "0.1.1", optional = true }
rand6 = { package = "rand", version = "0.6", features = ["wasm-bindgen"], optional = true } # Imported just for the `wasm-bindgen` feature

[dev-dependencies]
sc-keystore = { path = "../../../client/keystore" }
sc-consensus-babe = { path = "../../../client/consensus/babe", features = ["test-helpers"] }
sc-service-test = { path = "../../../client/service/test" }
sc-keystore = { version = "2.0.0", path = "../../../client/keystore" }
sc-consensus-babe = { version = "0.8", features = ["test-helpers"], path = "../../../client/consensus/babe" }
sc-service-test = { version = "2.0.0", path = "../../../client/service/test" }
futures = "0.3.1"
tempfile = "3.1.0"

[build-dependencies]
sc-cli = { package = "sc-cli", path = "../../../client/cli" }
build-script-utils = { package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
sc-cli = { version = "2.0.0", package = "sc-cli", path = "../../../client/cli" }
build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
structopt = "0.3.3"
vergen = "3.0.4"

Expand Down
40 changes: 20 additions & 20 deletions bin/node/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ edition = "2018"
[dependencies]
trie-root = "0.15.2"
codec = { package = "parity-scale-codec", version = "1.0.0" }
sp-io = { path = "../../../primitives/io" }
sp-state-machine = { path = "../../../primitives/state-machine" }
sc-executor = { path = "../../../client/executor" }
sp-core = { path = "../../../primitives/core" }
sp-trie = { path = "../../../primitives/trie" }
node-primitives = { path = "../primitives" }
node-runtime = { path = "../runtime" }
sp-io = { version = "2.0.0", path = "../../../primitives/io" }
sp-state-machine = { version = "2.0.0", path = "../../../primitives/state-machine" }
sc-executor = { version = "2.0.0", path = "../../../client/executor" }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-trie = { version = "2.0.0", path = "../../../primitives/trie" }
node-primitives = { version = "2.0.0", path = "../primitives" }
node-runtime = { version = "2.0.0", path = "../runtime" }

[dev-dependencies]
node-testing = { path = "../testing" }
substrate-test-client = { path = "../../../test-utils/client" }
sp-runtime = { path = "../../../primitives/runtime" }
frame-support = { path = "../../../frame/support" }
pallet-balances = { path = "../../../frame/balances" }
pallet-transaction-payment = { path = "../../../frame/transaction-payment" }
pallet-session = { path = "../../../frame/session" }
frame-system = { path = "../../../frame/system" }
pallet-timestamp = { path = "../../../frame/timestamp" }
pallet-treasury = { path = "../../../frame/treasury" }
pallet-contracts = { path = "../../../frame/contracts" }
pallet-grandpa = { path = "../../../frame/grandpa" }
pallet-indices = { path = "../../../frame/indices" }
node-testing = { version = "2.0.0", path = "../testing" }
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
frame-support = { version = "2.0.0", path = "../../../frame/support" }
pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
pallet-session = { version = "2.0.0", path = "../../../frame/session" }
frame-system = { version = "2.0.0", path = "../../../frame/system" }
pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
wabt = "0.9.2"
criterion = "0.3.0"

Expand Down
6 changes: 3 additions & 3 deletions bin/node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ authors = ["Parity Technologies <[email protected]>"]
edition = "2018"

[dependencies]
sp-core = { path = "../../../primitives/core", default-features = false }
sp-runtime = { path = "../../../primitives/runtime", default-features = false }
sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" }
sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" }

[dev-dependencies]
sp-serializer = { path = "../../../primitives/serializer" }
sp-serializer = { version = "2.0.0", path = "../../../primitives/serializer" }
pretty_assertions = "0.6.1"

[features]
Expand Down
4 changes: 2 additions & 2 deletions bin/node/rpc-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ futures = "0.1.29"
hyper = "0.12.35"
jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] }
log = "0.4.8"
node-primitives = { path = "../primitives" }
sc-rpc = { path = "../../../client/rpc", version = "2.0.0" }
node-primitives = { version = "2.0.0", path = "../primitives" }
sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
Loading