Skip to content

Update tc-subxt to bounded types #523

Update tc-subxt to bounded types

Update tc-subxt to bounded types #523

Triggered via pull request October 16, 2024 22:33
Status Failure
Total duration 16m 33s
Artifacts

pr-test-docs.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
build-docs: tc-subxt/src/api/networks.rs#L41
error[E0308]: `match` arms have incompatible types --> tc-subxt/src/api/networks.rs:41:4 | 41 | self.client.runtime_api().at_latest().await?.call(runtime_call).await? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected `ChainNetwork`, found a different `ChainNetwork` | this is found to be of type `std::option::Option<tc_subxt_metadata::timechain::runtime_types::time_primitives::network::ChainNetwork>` | ::: tc-subxt/src/metadata.rs:7:3 | 7 | / match $variant { 8 | | $crate::metadata::MetadataVariant::Mainnet => { 9 | | use tc_subxt_metadata::timechain as metadata; ... | 35 | | }, 36 | | } | |_________- `match` arms have incompatible types | = note: expected enum `std::option::Option<tc_subxt_metadata::timechain::runtime_types::time_primitives::network::ChainNetwork>` found enum `std::option::Option<tc_subxt_metadata::testnet::runtime_types::time_primitives::network::ChainNetwork>`
build-docs: tc-subxt/src/api/networks.rs#L41
error[E0308]: `match` arms have incompatible types --> tc-subxt/src/api/networks.rs:41:4 | 41 | self.client.runtime_api().at_latest().await?.call(runtime_call).await? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected `ChainNetwork`, found a different `ChainNetwork` | this is found to be of type `std::option::Option<tc_subxt_metadata::timechain::runtime_types::time_primitives::network::ChainNetwork>` | ::: tc-subxt/src/metadata.rs:7:3 | 7 | / match $variant { 8 | | $crate::metadata::MetadataVariant::Mainnet => { 9 | | use tc_subxt_metadata::timechain as metadata; ... | 35 | | }, 36 | | } | |_________- `match` arms have incompatible types | = note: expected enum `std::option::Option<tc_subxt_metadata::timechain::runtime_types::time_primitives::network::ChainNetwork>` found enum `std::option::Option<tc_subxt_metadata::testnet::runtime_types::time_primitives::network::ChainNetwork>`
build-docs: tc-subxt/src/metadata.rs#L7
error[E0308]: `match` arms have incompatible types --> tc-subxt/src/api/networks.rs:41:4 | 41 | self.client.runtime_api().at_latest().await?.call(runtime_call).await? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected `ChainNetwork`, found a different `ChainNetwork` | this is found to be of type `std::option::Option<tc_subxt_metadata::timechain::runtime_types::time_primitives::network::ChainNetwork>` | ::: tc-subxt/src/metadata.rs:7:3 | 7 | / match $variant { 8 | | $crate::metadata::MetadataVariant::Mainnet => { 9 | | use tc_subxt_metadata::timechain as metadata; ... | 35 | | }, 36 | | } | |_________- `match` arms have incompatible types | = note: expected enum `std::option::Option<tc_subxt_metadata::timechain::runtime_types::time_primitives::network::ChainNetwork>` found enum `std::option::Option<tc_subxt_metadata::testnet::runtime_types::time_primitives::network::ChainNetwork>`
build-docs: tc-subxt/src/api/shards.rs#L87
error[E0308]: `?` operator has incompatible types --> tc-subxt/src/api/shards.rs:87:7 | 84 | ) -> Result<Option<BoundedVec<TssPublicKey, ConstU32<MAX_SHARD_SIZE>>>> { | ------------------------------------------------------------------ expected `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` because of return type ... 87 | Ok(self.client.runtime_api().at_latest().await?.call(runtime_call).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<BoundedVec<[u8; 33], ...>>`, found `Option<BoundedVec<[u8; 33]>>` | = note: `?` operator cannot convert from `std::option::Option<tc_subxt_metadata::timechain::runtime_types::bounded_collections::bounded_vec::BoundedVec<[u8; 33]>>` to `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` = note: `BoundedVec<[u8; 33]>` and `BoundedVec<[u8; 33], ConstU32<100>>` have similar names, but are actually distinct types note: `BoundedVec<[u8; 33]>` is defined in crate `tc_subxt_metadata` --> /home/runner-3/runner/_work/timechain/timechain/target/release/build/tc-subxt-metadata-bb346419431b7bc6/out/metadata.rs:1:1 | 1 | / #[subxt::subxt( 2 | | runtime_metadata_path = "/home/runner-3/runner/_work/timechain/timechain/target/release/wbuild/mainnet-runtime/mainnet_runtime.me... 3 | | derive_for_all_types = "PartialEq, Clone", 4 | | substitute_type(path = "time_primitives::gmp::GmpMessage", with = "::subxt::utils::Static<time_primitives::gmp::GmpMessage>"), ... | 16 | | 17 | | )] | |______^ note: `BoundedVec<[u8; 33], ConstU32<100>>` is defined in crate `bounded_collections` --> /home/runner-3/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bounded-collections-0.2.0/src/bounded_vec.rs:47:1 | 47 | pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)
build-docs: tc-subxt/src/api/shards.rs#L84
error[E0308]: `?` operator has incompatible types --> tc-subxt/src/api/shards.rs:87:7 | 84 | ) -> Result<Option<BoundedVec<TssPublicKey, ConstU32<MAX_SHARD_SIZE>>>> { | ------------------------------------------------------------------ expected `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` because of return type ... 87 | Ok(self.client.runtime_api().at_latest().await?.call(runtime_call).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<BoundedVec<[u8; 33], ...>>`, found `Option<BoundedVec<[u8; 33]>>` | = note: `?` operator cannot convert from `std::option::Option<tc_subxt_metadata::timechain::runtime_types::bounded_collections::bounded_vec::BoundedVec<[u8; 33]>>` to `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` = note: `BoundedVec<[u8; 33]>` and `BoundedVec<[u8; 33], ConstU32<100>>` have similar names, but are actually distinct types note: `BoundedVec<[u8; 33]>` is defined in crate `tc_subxt_metadata` --> /home/runner-3/runner/_work/timechain/timechain/target/release/build/tc-subxt-metadata-bb346419431b7bc6/out/metadata.rs:1:1 | 1 | / #[subxt::subxt( 2 | | runtime_metadata_path = "/home/runner-3/runner/_work/timechain/timechain/target/release/wbuild/mainnet-runtime/mainnet_runtime.me... 3 | | derive_for_all_types = "PartialEq, Clone", 4 | | substitute_type(path = "time_primitives::gmp::GmpMessage", with = "::subxt::utils::Static<time_primitives::gmp::GmpMessage>"), ... | 16 | | 17 | | )] | |______^ note: `BoundedVec<[u8; 33], ConstU32<100>>` is defined in crate `bounded_collections` --> /home/runner-3/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bounded-collections-0.2.0/src/bounded_vec.rs:47:1 | 47 | pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)
build-docs: tc-subxt/src/api/shards.rs#L87
error[E0308]: `?` operator has incompatible types --> tc-subxt/src/api/shards.rs:87:7 | 84 | ) -> Result<Option<BoundedVec<TssPublicKey, ConstU32<MAX_SHARD_SIZE>>>> { | ------------------------------------------------------------------ expected `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` because of return type ... 87 | Ok(self.client.runtime_api().at_latest().await?.call(runtime_call).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<BoundedVec<[u8; 33], ...>>`, found `Option<BoundedVec<[u8; 33]>>` | = note: `?` operator cannot convert from `std::option::Option<tc_subxt_metadata::testnet::runtime_types::bounded_collections::bounded_vec::BoundedVec<[u8; 33]>>` to `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` = note: `BoundedVec<[u8; 33]>` and `BoundedVec<[u8; 33], ConstU32<100>>` have similar names, but are actually distinct types note: `BoundedVec<[u8; 33]>` is defined in crate `tc_subxt_metadata` --> /home/runner-3/runner/_work/timechain/timechain/target/release/build/tc-subxt-metadata-bb346419431b7bc6/out/metadata.rs:20:1 | 20 | / #[subxt::subxt( 21 | | runtime_metadata_path = "/home/runner-3/runner/_work/timechain/timechain/target/release/wbuild/testnet-runtime/testnet_runtime.me... 22 | | derive_for_all_types = "PartialEq, Clone", 23 | | substitute_type(path = "time_primitives::gmp::GmpMessage", with = "::subxt::utils::Static<time_primitives::gmp::GmpMessage>"), ... | 35 | | 36 | | )] | |______^ note: `BoundedVec<[u8; 33], ConstU32<100>>` is defined in crate `bounded_collections` --> /home/runner-3/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bounded-collections-0.2.0/src/bounded_vec.rs:47:1 | 47 | pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)
build-docs: tc-subxt/src/api/shards.rs#L84
error[E0308]: `?` operator has incompatible types --> tc-subxt/src/api/shards.rs:87:7 | 84 | ) -> Result<Option<BoundedVec<TssPublicKey, ConstU32<MAX_SHARD_SIZE>>>> { | ------------------------------------------------------------------ expected `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` because of return type ... 87 | Ok(self.client.runtime_api().at_latest().await?.call(runtime_call).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<BoundedVec<[u8; 33], ...>>`, found `Option<BoundedVec<[u8; 33]>>` | = note: `?` operator cannot convert from `std::option::Option<tc_subxt_metadata::testnet::runtime_types::bounded_collections::bounded_vec::BoundedVec<[u8; 33]>>` to `std::option::Option<polkadot_sdk::frame_election_provider_support::BoundedVec<[u8; 33], ConstU32<100>>>` = note: `BoundedVec<[u8; 33]>` and `BoundedVec<[u8; 33], ConstU32<100>>` have similar names, but are actually distinct types note: `BoundedVec<[u8; 33]>` is defined in crate `tc_subxt_metadata` --> /home/runner-3/runner/_work/timechain/timechain/target/release/build/tc-subxt-metadata-bb346419431b7bc6/out/metadata.rs:20:1 | 20 | / #[subxt::subxt( 21 | | runtime_metadata_path = "/home/runner-3/runner/_work/timechain/timechain/target/release/wbuild/testnet-runtime/testnet_runtime.me... 22 | | derive_for_all_types = "PartialEq, Clone", 23 | | substitute_type(path = "time_primitives::gmp::GmpMessage", with = "::subxt::utils::Static<time_primitives::gmp::GmpMessage>"), ... | 35 | | 36 | | )] | |______^ note: `BoundedVec<[u8; 33], ConstU32<100>>` is defined in crate `bounded_collections` --> /home/runner-3/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bounded-collections-0.2.0/src/bounded_vec.rs:47:1 | 47 | pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)
build-docs: tc-subxt/src/api/tasks.rs#L68
error[E0308]: mismatched types --> tc-subxt/src/api/tasks.rs:68:7 | 68 | Ok(output) | -- ^^^^^^ expected `Option<Result<(), ...>>`, found `Option<Result<(), BoundedVec<u8>>>` | | | arguments to this enum variant are incorrect | = note: `BoundedVec<u8>` and `BoundedVec<u8, ConstU32<500>>` have similar names, but are actually distinct types note: `BoundedVec<u8>` is defined in crate `tc_subxt_metadata` --> /home/runner-3/runner/_work/timechain/timechain/target/release/build/tc-subxt-metadata-bb346419431b7bc6/out/metadata.rs:1:1 | 1 | / #[subxt::subxt( 2 | | runtime_metadata_path = "/home/runner-3/runner/_work/timechain/timechain/target/release/wbuild/mainnet-runtime/mainnet_runtime.me... 3 | | derive_for_all_types = "PartialEq, Clone", 4 | | substitute_type(path = "time_primitives::gmp::GmpMessage", with = "::subxt::utils::Static<time_primitives::gmp::GmpMessage>"), ... | 16 | | 17 | | )] | |______^ note: `BoundedVec<u8, ConstU32<500>>` is defined in crate `bounded_collections` --> /home/runner-3/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bounded-collections-0.2.0/src/bounded_vec.rs:47:1 | 47 | pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the type constructed contains `std::option::Option<Result<(), tc_subxt_metadata::timechain::runtime_types::bounded_collections::bounded_vec::BoundedVec<u8>>>` due to the type of the argument passed --> tc-subxt/src/api/tasks.rs:68:4 | 68 | Ok(output) | ^^^------^ | | | this argument influences the type of `Ok` note: tuple variant defined here --> /home/runner-3/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:506:5 | 506 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | ^^ = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)
build-docs: tc-subxt/src/api/tasks.rs#L68
error[E0308]: mismatched types --> tc-subxt/src/api/tasks.rs:68:7 | 68 | Ok(output) | -- ^^^^^^ expected `Option<Result<(), ...>>`, found `Option<Result<(), BoundedVec<u8>>>` | | | arguments to this enum variant are incorrect | = note: `BoundedVec<u8>` and `BoundedVec<u8, ConstU32<500>>` have similar names, but are actually distinct types note: `BoundedVec<u8>` is defined in crate `tc_subxt_metadata` --> /home/runner-3/runner/_work/timechain/timechain/target/release/build/tc-subxt-metadata-bb346419431b7bc6/out/metadata.rs:1:1 | 1 | / #[subxt::subxt( 2 | | runtime_metadata_path = "/home/runner-3/runner/_work/timechain/timechain/target/release/wbuild/mainnet-runtime/mainnet_runtime.me... 3 | | derive_for_all_types = "PartialEq, Clone", 4 | | substitute_type(path = "time_primitives::gmp::GmpMessage", with = "::subxt::utils::Static<time_primitives::gmp::GmpMessage>"), ... | 16 | | 17 | | )] | |______^ note: `BoundedVec<u8, ConstU32<500>>` is defined in crate `bounded_collections` --> /home/runner-3/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bounded-collections-0.2.0/src/bounded_vec.rs:47:1 | 47 | pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the type constructed contains `std::option::Option<Result<(), tc_subxt_metadata::timechain::runtime_types::bounded_collections::bounded_vec::BoundedVec<u8>>>` due to the type of the argument passed --> tc-subxt/src/api/tasks.rs:68:4 | 68 | Ok(output) | ^^^------^ | | | this argument influences the type of `Ok` note: tuple variant defined here --> /home/runner-3/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:506:5 | 506 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | ^^ = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)
build-docs: tc-subxt/src/api/tasks.rs#L68
error[E0308]: mismatched types --> tc-subxt/src/api/tasks.rs:68:7 | 68 | Ok(output) | -- ^^^^^^ expected `Option<Result<(), ...>>`, found `Option<Result<(), BoundedVec<u8>>>` | | | arguments to this enum variant are incorrect | = note: `BoundedVec<u8>` and `BoundedVec<u8, ConstU32<500>>` have similar names, but are actually distinct types note: `BoundedVec<u8>` is defined in crate `tc_subxt_metadata` --> /home/runner-3/runner/_work/timechain/timechain/target/release/build/tc-subxt-metadata-bb346419431b7bc6/out/metadata.rs:20:1 | 20 | / #[subxt::subxt( 21 | | runtime_metadata_path = "/home/runner-3/runner/_work/timechain/timechain/target/release/wbuild/testnet-runtime/testnet_runtime.me... 22 | | derive_for_all_types = "PartialEq, Clone", 23 | | substitute_type(path = "time_primitives::gmp::GmpMessage", with = "::subxt::utils::Static<time_primitives::gmp::GmpMessage>"), ... | 35 | | 36 | | )] | |______^ note: `BoundedVec<u8, ConstU32<500>>` is defined in crate `bounded_collections` --> /home/runner-3/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bounded-collections-0.2.0/src/bounded_vec.rs:47:1 | 47 | pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the type constructed contains `std::option::Option<Result<(), tc_subxt_metadata::testnet::runtime_types::bounded_collections::bounded_vec::BoundedVec<u8>>>` due to the type of the argument passed --> tc-subxt/src/api/tasks.rs:68:4 | 68 | Ok(output) | ^^^------^ | | | this argument influences the type of `Ok` note: tuple variant defined here --> /home/runner-3/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:506:5 | 506 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | ^^ = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)