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

Commit

Permalink
Fix UI tests and bump trybuild dep
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Jan 6, 2021
1 parent f78a414 commit c59d75f
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frame/support/test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "frame-support-test"
version = "2.0.0"
version = "2.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -21,7 +21,7 @@ sp-inherents = { version = "2.0.0", default-features = false, path = "../../../p
sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" }
sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" }
sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" }
trybuild = "1.0.33"
trybuild = "1.0.38"
pretty_assertions = "0.6.1"
rustversion = "1.0.0"
frame-metadata = { version = "12.0.0", default-features = false, path = "../../metadata" }
Expand Down
4 changes: 2 additions & 2 deletions primitives/api/test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sp-api-test"
version = "2.0.0"
version = "2.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -21,7 +21,7 @@ sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common
sc-block-builder = { version = "0.8.0", path = "../../../client/block-builder" }
codec = { package = "parity-scale-codec", version = "1.3.1" }
sp-state-machine = { version = "0.8.0", path = "../../../primitives/state-machine" }
trybuild = "1.0.17"
trybuild = "1.0.38"
rustversion = "1.0.0"

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
17 | sp_api::impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found struct `std::string::String`
|
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<std::string::String>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<std::string::String>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
Expand Down
20 changes: 10 additions & 10 deletions primitives/api/test/tests/ui/mock_only_one_error_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: Error type can not change between runtime apis
23 | type Error = u64;
| ^^^^

error[E0277]: the trait bound `u32: std::convert::From<std::string::String>` is not satisfied
error[E0277]: the trait bound `u32: From<String>` is not satisfied
--> $DIR/mock_only_one_error_type.rs:15:1
|
15 | / sp_api::mock_impl_runtime_apis! {
Expand All @@ -14,17 +14,17 @@ error[E0277]: the trait bound `u32: std::convert::From<std::string::String>` is
... |
26 | | }
27 | | }
| |_^ the trait `std::convert::From<std::string::String>` is not implemented for `u32`
|
::: $WORKSPACE/primitives/api/src/lib.rs:350:35
| |_^ the trait `From<String>` is not implemented for `u32`
|
350 | type Error: std::fmt::Debug + From<String>;
| ------------ required by this bound in `sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiErrorExt`
::: $WORKSPACE/primitives/api/src/lib.rs
|
| type Error: std::fmt::Debug + From<String>;
| ------------ required by this bound in `ApiErrorExt`
|
= help: the following implementations were found:
<u32 as std::convert::From<bool>>
<u32 as std::convert::From<char>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
<u32 as From<HttpError>>
<u32 as From<HttpRequestId>>
<u32 as From<HttpRequestStatus>>
<u32 as From<Ipv4Addr>>
and 18 others
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
8 changes: 4 additions & 4 deletions primitives/api/test/tests/ui/mock_only_self_reference.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
12 | sp_api::mock_impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
|
= note: expected fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<()>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for trait
Expand All @@ -42,6 +42,6 @@ error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for t
12 | sp_api::mock_impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
|
= note: expected fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<()>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
17 | sp_api::impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `&u64`
|
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<&u64>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
Expand Down
4 changes: 2 additions & 2 deletions primitives/runtime-interface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sp-runtime-interface"
version = "2.0.0"
version = "2.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "Apache-2.0"
Expand Down Expand Up @@ -30,7 +30,7 @@ sp-state-machine = { version = "0.8.0", path = "../../primitives/state-machine"
sp-core = { version = "2.0.0", path = "../core" }
sp-io = { version = "2.0.0", path = "../io" }
rustversion = "1.0.0"
trybuild = "1.0.23"
trybuild = "1.0.38"

[features]
default = [ "std" ]
Expand Down
4 changes: 2 additions & 2 deletions test-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "substrate-test-utils"
version = "2.0.0"
version = "2.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -18,4 +18,4 @@ tokio = { version = "0.2.13", features = ["macros"] }

[dev-dependencies]
sc-service = { version = "0.8.0", path = "../client/service" }
trybuild = { version = "1.0", features = ["diff"] }
trybuild = { version = "1.0.38", features = [ "diff" ] }

0 comments on commit c59d75f

Please sign in to comment.