From d9f7fb3342232e4f9d95e17734669ba61a872afb Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 2 Dec 2019 17:18:29 +0000 Subject: [PATCH 1/3] Fix sp-session typo --- .maintain/rename-crates-for-2.0.sh | 8 ++++---- Cargo.lock | 12 ++++++------ bin/node-template/runtime/Cargo.toml | 4 ++-- bin/node-template/runtime/src/lib.rs | 2 +- bin/node/runtime/Cargo.toml | 4 ++-- bin/node/runtime/src/lib.rs | 2 +- client/rpc/Cargo.toml | 2 +- client/service/Cargo.toml | 2 +- primitives/session/Cargo.toml | 2 +- test/utils/runtime/Cargo.toml | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index 89bd2f9b33a5d..cd68abac9877f 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -22,7 +22,7 @@ function rename() { rename_gitlabci $old $new # and it appears, we have the same syntax in rust files rust_rename $old $new - + # but generally we have the snail case syntax in rust files old=$(echo $old | sed s/-/_/g ); new=$(echo $new | sed s/-/_/g ); @@ -57,7 +57,7 @@ TO_RENAME=( "substrate-runtime-interface-proc-macro sp-runtime-interface-proc-macro" "substrate-runtime-interface-test-wasm sp-runtime-interface-test-wasm" "substrate-serializer sp-serializer" - "substrate-session sp-sesssion" + "substrate-session sp-session" "sr-api sp-api" "sr-api-proc-macro sp-api-proc-macro" "sr-api-test sp-api-test" @@ -103,10 +103,10 @@ TO_RENAME=( "substrate-state-db sc-state-db" "substrate-telemetry sc-telemetry" "substrate-tracing sc-tracing" - + ); for rule in "${TO_RENAME[@]}" do rename "$rule"; -done \ No newline at end of file +done diff --git a/Cargo.lock b/Cargo.lock index 4cfd25f917c49..557d1dd1f2997 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3148,7 +3148,7 @@ dependencies = [ "sp-keyring 2.0.0", "sp-offchain 2.0.0", "sp-runtime 2.0.0", - "sp-sesssion 2.0.0", + "sp-session 2.0.0", "sp-staking 2.0.0", "sp-std 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", @@ -3216,7 +3216,7 @@ dependencies = [ "sp-io 2.0.0", "sp-offchain 2.0.0", "sp-runtime 2.0.0", - "sp-sesssion 2.0.0", + "sp-session 2.0.0", "sp-std 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", "sp-version 2.0.0", @@ -5392,7 +5392,7 @@ dependencies = [ "sp-io 2.0.0", "sp-rpc 2.0.0", "sp-runtime 2.0.0", - "sp-sesssion 2.0.0", + "sp-session 2.0.0", "sp-state-machine 2.0.0", "sp-transaction-pool-api 2.0.0", "sp-version 2.0.0", @@ -5487,7 +5487,7 @@ dependencies = [ "sp-finality-granpda 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", - "sp-sesssion 2.0.0", + "sp-session 2.0.0", "sp-transaction-pool-api 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", "substrate-test-runtime-client 2.0.0", @@ -6319,7 +6319,7 @@ dependencies = [ ] [[package]] -name = "sp-sesssion" +name = "sp-session" version = "2.0.0" dependencies = [ "sp-api 2.0.0", @@ -6646,7 +6646,7 @@ dependencies = [ "sp-offchain 2.0.0", "sp-runtime 2.0.0", "sp-runtime-interface 2.0.0", - "sp-sesssion 2.0.0", + "sp-session 2.0.0", "sp-state-machine 2.0.0", "sp-std 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index 1f71c426fe3e4..51f648185e3cb 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -23,7 +23,7 @@ safe-mix = { version = "1.0.0", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-api = { path = "../../../primitives/sr-api", default-features = false } sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } -sp-sesssion = { path = "../../../primitives/session", default-features = false } +sp-session = { path = "../../../primitives/session", default-features = false } sudo = { package = "pallet-sudo", path = "../../../frame/sudo", default-features = false } support = { package = "frame-support", path = "../../../frame/support", default-features = false } system = { package = "frame-system", path = "../../../frame/system", default-features = false } @@ -56,7 +56,7 @@ std = [ "serde", "sp-api/std", "sp-runtime/std", - "sp-sesssion/std", + "sp-session/std", "sudo/std", "support/std", "system/std", diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs index f16018da8fcf4..3d1cf2d519f3a 100644 --- a/bin/node-template/runtime/src/lib.rs +++ b/bin/node-template/runtime/src/lib.rs @@ -350,7 +350,7 @@ impl_runtime_apis! { } } - impl sp_sesssion::SessionKeys for Runtime { + impl sp_session::SessionKeys for Runtime { fn generate_session_keys(seed: Option>) -> Vec { opaque::SessionKeys::generate(seed) } diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index 18e307c55b7af..7744fb473742d 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -26,7 +26,7 @@ sp-api = { path = "../../../primitives/sr-api", default-features = false } sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } sp-staking = { path = "../../../primitives/sr-staking-primitives", default-features = false } sp-keyring = { path = "../../../primitives/keyring", optional = true } -sp-sesssion = { path = "../../../primitives/session", default-features = false } +sp-session = { path = "../../../primitives/session", default-features = false } txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false } version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false } @@ -107,7 +107,7 @@ std = [ "sp-staking/std", "staking/std", "sp-keyring", - "sp-sesssion/std", + "sp-session/std", "sudo/std", "support/std", "system-rpc-runtime-api/std", diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 3cb4912571e84..ca451db15e954 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -711,7 +711,7 @@ impl_runtime_apis! { } } - impl sp_sesssion::SessionKeys for Runtime { + impl sp_session::SessionKeys for Runtime { fn generate_session_keys(seed: Option>) -> Vec { SessionKeys::generate(seed) } diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index 5bb947eb0c15d..20214d5796c16 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -17,7 +17,7 @@ primitives = { package = "sp-core", path = "../../primitives/core" } rpc = { package = "jsonrpc-core", version = "14.0.3" } runtime_version = { package = "sp-version", path = "../../primitives/sr-version" } serde_json = "1.0.41" -session = { package = "sp-sesssion", path = "../../primitives/session" } +session = { package = "sp-session", path = "../../primitives/session" } sp-runtime = { path = "../../primitives/sr-primitives" } rpc-primitives = { package = "sp-rpc", path = "../../primitives/rpc" } state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 426c3a76dc01c..e03c263b80726 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -33,7 +33,7 @@ sp-io = { path = "../../primitives/sr-io" } sp-runtime = { path = "../../primitives/sr-primitives" } sp-blockchain = { path = "../../primitives/blockchain" } primitives = { package = "sp-core", path = "../../primitives/core" } -session = { package = "sp-sesssion", path = "../../primitives/session" } +session = { package = "sp-session", path = "../../primitives/session" } app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto" } consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" } network = { package = "sc-network", path = "../network" } diff --git a/primitives/session/Cargo.toml b/primitives/session/Cargo.toml index 447cf8ad1b8b1..e1fbd3e9a9106 100644 --- a/primitives/session/Cargo.toml +++ b/primitives/session/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sp-sesssion" +name = "sp-session" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/test/utils/runtime/Cargo.toml b/test/utils/runtime/Cargo.toml index 77224c2ef18cb..ed7d98f0644c1 100644 --- a/test/utils/runtime/Cargo.toml +++ b/test/utils/runtime/Cargo.toml @@ -25,7 +25,7 @@ runtime_io = { package = "sp-io", path = "../../../primitives/sr-io", default-fe runtime_support = { package = "frame-support", path = "../../../frame/support", default-features = false } runtime_version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -session = { package = "sp-sesssion", path = "../../../primitives/session", default-features = false } +session = { package = "sp-session", path = "../../../primitives/session", default-features = false } sp-api = { path = "../../../primitives/sr-api", default-features = false } sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } pallet-babe = { path = "../../../frame/babe", default-features = false } From 177101ba04d7c62488dc61a5885a60c4ebf52ed0 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 2 Dec 2019 17:24:27 +0000 Subject: [PATCH 2/3] Remove erroneous whitespaces --- .maintain/rename-crates-for-2.0.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index cd68abac9877f..f865959392164 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -22,7 +22,6 @@ function rename() { rename_gitlabci $old $new # and it appears, we have the same syntax in rust files rust_rename $old $new - # but generally we have the snail case syntax in rust files old=$(echo $old | sed s/-/_/g ); new=$(echo $new | sed s/-/_/g ); @@ -103,7 +102,6 @@ TO_RENAME=( "substrate-state-db sc-state-db" "substrate-telemetry sc-telemetry" "substrate-tracing sc-tracing" - ); for rule in "${TO_RENAME[@]}" From a428963f9b718024a1f09d40ea021c3dd25c2003 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 2 Dec 2019 17:27:54 +0000 Subject: [PATCH 3/3] Don't mess with the file, editor --- .maintain/rename-crates-for-2.0.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index f865959392164..cd68abac9877f 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -22,6 +22,7 @@ function rename() { rename_gitlabci $old $new # and it appears, we have the same syntax in rust files rust_rename $old $new + # but generally we have the snail case syntax in rust files old=$(echo $old | sed s/-/_/g ); new=$(echo $new | sed s/-/_/g ); @@ -102,6 +103,7 @@ TO_RENAME=( "substrate-state-db sc-state-db" "substrate-telemetry sc-telemetry" "substrate-tracing sc-tracing" + ); for rule in "${TO_RENAME[@]}"