Skip to content
Snippets Groups Projects
Unverified Commit 5b7f24fc authored by Alexander Samusev's avatar Alexander Samusev Committed by GitHub
Browse files

[ci] Update rust in ci image (1.75 and 2024-01-22) (#3016)


cc https://github.com/paritytech/ci_cd/issues/926

---------

Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: default avatarBastian Köcher <git@kchr.de>
Co-authored-by: default avatarLiam Aharon <liam.aharon@hotmail.com>
Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
Co-authored-by: Vladimir Istyufeev's avatarVladimir Istyufeev <vladimir@parity.io>
parent 5a6f6d33
No related merge requests found
Pipeline #439847 passed with stages
in 1 hour, 16 minutes, and 38 seconds
Showing
with 111 additions and 44 deletions
......@@ -15,7 +15,7 @@ jobs:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
container:
image: paritytech/ci-unified:bullseye-1.74.0-2023-11-01-v20231204
image: docker.io/paritytech/ci-unified:bullseye-1.75.0-2024-01-22-v20240109
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
......
......@@ -21,7 +21,8 @@ workflow:
- if: $CI_COMMIT_BRANCH
variables:
CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
# CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
CI_IMAGE: "docker.io/paritytech/ci-unified:bullseye-1.75.0-2024-01-22-v20240109"
# BUILDAH_IMAGE is defined in group variables
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"
......
......@@ -79,8 +79,6 @@ use xcm_executor::traits::ConvertLocation;
#[cfg(feature = "runtime-benchmarks")]
use frame_support::traits::OriginTrait;
pub use pallet::*;
pub type BalanceOf<T> =
<<T as pallet::Config>::Token as Inspect<<T as frame_system::Config>::AccountId>>::Balance;
pub type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
......
......@@ -38,7 +38,7 @@
//! // Use nightly formatting.
//! // See the polkadot-sdk CI job that checks formatting for the current version used in
//! // polkadot-sdk.
//! "rust-analyzer.rustfmt.extraArgs": ["+nightly-2023-11-01"],
//! "rust-analyzer.rustfmt.extraArgs": ["+nightly-2024-01-22"],
//! }
//! ```
//!
......@@ -79,7 +79,7 @@
//! # Use nightly formatting.
//! # See the polkadot-sdk CI job that checks formatting for the current version used in
//! # polkadot-sdk.
//! extraArgs = { "+nightly-2023-11-01" },
//! extraArgs = { "+nightly-2024-01-22" },
//! },
//! },
//! ```
......
......@@ -161,7 +161,7 @@ fn prepare_test_inner(
candidate_hashes
.get(&Hash::repeat_byte(block_num as u8))
.expect("just inserted above")
.get(0)
.first()
.expect("just inserted above")
.clone(),
);
......
......@@ -17,7 +17,6 @@
use polkadot_primitives::ValidatorId;
use sc_keystore::LocalKeystore;
use sp_application_crypto::AppCrypto;
pub use sp_core::sr25519;
use sp_core::sr25519::Public;
use sp_keystore::Keystore;
use std::sync::Arc;
......
......@@ -25,7 +25,6 @@ pub mod runtime_api;
pub use av_store::*;
pub use chain_api::*;
pub use network_bridge::*;
pub use runtime_api::*;
pub struct AlwaysSupportsParachains {}
......
......@@ -20,8 +20,8 @@
pub use sp_core::H256;
use sp_runtime::traits::Hash;
pub use sp_runtime::{
traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Lazy, Verify},
BuildStorage, MultiSignature,
traits::{BlakeTwo256, IdentifyAccount, Lazy, Verify},
BuildStorage,
};
use sp_std::convert::{TryFrom, TryInto};
......
......@@ -159,7 +159,7 @@ fn invoke_cargo_fmt<'a>(
) -> Result<()> {
// If rustfmt is not installed, skip the check.
if !Command::new("rustup")
.args(["nightly-2023-11-01", "run", "rustfmt", "--version"])
.args(["nightly-2024-01-22", "run", "rustfmt", "--version"])
.output()
.map_or(false, |o| o.status.success())
{
......@@ -167,7 +167,7 @@ fn invoke_cargo_fmt<'a>(
}
let fmt_res = Command::new("rustup")
.args(["nightly-2023-11-01", "run", "rustfmt", "--check", "--config-path"])
.args(["nightly-2024-01-22", "run", "rustfmt", "--check", "--config-path"])
.arg(config_path)
.args(files)
.output()
......@@ -182,7 +182,7 @@ fn invoke_cargo_fmt<'a>(
eprintln!("{}\n{}", stdout, stderr);
eprintln!(
"Fixtures files are not formatted.\n
Please run `rustup nightly-2023-11-01 run rustfmt --config-path {} {}/*.rs`",
Please run `rustup nightly-2024-01-22 run rustfmt --config-path {} {}/*.rs`",
config_path.display(),
contract_dir.display()
);
......@@ -309,7 +309,7 @@ fn find_workspace_root(current_dir: &Path) -> Option<PathBuf> {
let cargo_toml_contents =
std::fs::read_to_string(current_dir.join("Cargo.toml")).ok()?;
if cargo_toml_contents.contains("[workspace]") {
return Some(current_dir)
return Some(current_dir);
}
}
......
......@@ -261,6 +261,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
});
quote::quote_spanned!(span =>
#[doc(hidden)]
mod warnings {
#(
#call_index_warnings
......@@ -270,6 +271,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
)*
}
#[allow(unused_imports)]
#[doc(hidden)]
pub mod __substrate_call_check {
#[macro_export]
......@@ -455,6 +457,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
}
impl<#type_impl_gen> #pallet_ident<#type_use_gen> #where_clause {
#[allow(dead_code)]
#[doc(hidden)]
pub fn call_functions() -> #frame_support::__private::metadata_ir::PalletCallMetadataIR {
#frame_support::__private::scale_info::meta_type::<#call_ident<#type_use_gen>>().into()
......
......@@ -449,3 +449,69 @@ note: required by a bound in `Result`
| pub enum Result<T, E> {
| ^ required by this bound in `Result`
= note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::__private::codec::Decode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:20:1
|
20 | // construct_runtime! {
21 | || pub struct Runtime where
22 | || Block = Block,
23 | || NodeBlock = Block,
... ||
27 | || }
28 | || }
| ||_- in this macro invocation
... |
|
= note: required for `Pallet<Runtime>` to implement `Callable<Runtime>`
note: required because it appears within the type `RuntimeCall`
--> tests/construct_runtime_ui/deprecated_where_block.rs:20:1
|
20 | // construct_runtime! {
21 | || pub struct Runtime where
22 | || Block = Block,
23 | || NodeBlock = Block,
... ||
27 | || }
28 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `frame_support::sp_runtime::traits::Dispatchable::Config`
--> $WORKSPACE/substrate/primitives/runtime/src/traits.rs
|
| type Config;
| ^^^^^^^^^^^^ required by this bound in `Dispatchable::Config`
= note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:20:1
|
20 | // construct_runtime! {
21 | || pub struct Runtime where
22 | || Block = Block,
23 | || NodeBlock = Block,
... ||
27 | || }
28 | || }
| ||_- in this macro invocation
... |
|
= note: required for `Pallet<Runtime>` to implement `Callable<Runtime>`
note: required because it appears within the type `RuntimeCall`
--> tests/construct_runtime_ui/deprecated_where_block.rs:20:1
|
20 | // construct_runtime! {
21 | || pub struct Runtime where
22 | || Block = Block,
23 | || NodeBlock = Block,
... ||
27 | || }
28 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `frame_support::pallet_prelude::ValidateUnsigned::Call`
--> $WORKSPACE/substrate/primitives/runtime/src/traits.rs
|
| type Call;
| ^^^^^^^^^^ required by this bound in `ValidateUnsigned::Call`
= note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
......@@ -2,4 +2,4 @@ error[E0220]: associated type `Block` not found for `Self`
--> tests/pallet_ui/default_config_with_no_default_in_system.rs:25:31
|
25 | type MyGetParam2: Get<Self::Block>;
| ^^^^^ there is a similarly named associated type `Block` in the trait `frame_system::Config`
| ^^^^^ there is an associated type `Block` in the trait `frame_system::Config`
......@@ -16,6 +16,7 @@
// limitations under the License.
#[frame_support::pallet]
#[allow(unused_imports)]
mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {}
......@@ -32,5 +33,4 @@ mod pallet {
#[derive(scale_info::TypeInfo, codec::Encode, codec::Decode)]
enum MyError {}
fn main() {
}
fn main() {}
error[E0277]: the trait bound `MyError: PalletError` is not satisfied
--> tests/pallet_ui/error_does_not_derive_pallet_error.rs:28:15
--> tests/pallet_ui/error_does_not_derive_pallet_error.rs:29:15
|
28 | CustomError(crate::MyError),
29 | CustomError(crate::MyError),
| ^^^^^^^^^^^^^^ the trait `PalletError` is not implemented for `MyError`
|
= help: the following other types implement trait `PalletError`:
......
......@@ -16,6 +16,7 @@
// limitations under the License.
#[frame_support::pallet]
#[allow(unused_imports)]
mod pallet {
use frame_support::pallet_prelude::{Hooks, IsType};
use frame_system::pallet_prelude::BlockNumberFor;
......@@ -41,5 +42,4 @@ mod pallet {
}
}
fn main() {
}
fn main() {}
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
--> tests/pallet_ui/event_field_not_member.rs:40:7
--> tests/pallet_ui/event_field_not_member.rs:41:7
|
40 | B { b: T::Bar },
41 | B { b: T::Bar },
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
--> tests/pallet_ui/event_field_not_member.rs:40:7
--> tests/pallet_ui/event_field_not_member.rs:41:7
|
40 | B { b: T::Bar },
41 | B { b: T::Bar },
| ^
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
--> tests/pallet_ui/event_field_not_member.rs:40:7
--> tests/pallet_ui/event_field_not_member.rs:41:7
|
40 | B { b: T::Bar },
41 | B { b: T::Bar },
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
......
......@@ -19,6 +19,7 @@ use codec::{Decode, Encode};
use frame_support::PalletError;
#[frame_support::pallet]
#[allow(unused_imports)]
mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {}
......@@ -34,25 +35,24 @@ mod pallet {
#[derive(Encode, Decode, PalletError, scale_info::TypeInfo)]
pub enum MyError {
Foo,
Bar,
Baz(NestedError),
Struct(MyStruct),
Wrapper(Wrapper),
Foo,
Bar,
Baz(NestedError),
Struct(MyStruct),
Wrapper(Wrapper),
}
#[derive(Encode, Decode, PalletError, scale_info::TypeInfo)]
pub enum NestedError {
Quux
Quux,
}
#[derive(Encode, Decode, PalletError, scale_info::TypeInfo)]
pub struct MyStruct {
field: u8,
field: u8,
}
#[derive(Encode, Decode, PalletError, scale_info::TypeInfo)]
pub struct Wrapper(bool);
fn main() {
}
fn main() {}
......@@ -16,6 +16,7 @@
// limitations under the License.
#[frame_support::pallet]
#[allow(unused_imports)]
mod pallet {
use frame_support::pallet_prelude::{Hooks, IsType};
use frame_system::pallet_prelude::BlockNumberFor;
......
......@@ -16,6 +16,7 @@
// limitations under the License.
#[frame_support::pallet]
#[allow(unused_imports)]
mod pallet {
use frame_support::pallet_prelude::*;
......@@ -34,5 +35,4 @@ mod pallet {
type Foo<T: Config> = StorageValue<_, u8, ResultQuery<Error::NonExistentValue>>;
}
fn main() {
}
fn main() {}
error[E0107]: missing generics for enum `pallet::Error`
--> tests/pallet_ui/storage_result_query_missing_generics.rs:34:56
--> tests/pallet_ui/storage_result_query_missing_generics.rs:35:56
|
34 | type Foo<T: Config> = StorageValue<_, u8, ResultQuery<Error::NonExistentValue>>;
35 | type Foo<T: Config> = StorageValue<_, u8, ResultQuery<Error::NonExistentValue>>;
| ^^^^^ expected 1 generic argument
|
note: enum defined here, with 1 generic parameter: `T`
--> tests/pallet_ui/storage_result_query_missing_generics.rs:29:11
--> tests/pallet_ui/storage_result_query_missing_generics.rs:30:11
|
29 | pub enum Error<T> {
30 | pub enum Error<T> {
| ^^^^^ -
help: add missing generic argument
|
34 | type Foo<T: Config> = StorageValue<_, u8, ResultQuery<Error<T>::NonExistentValue>>;
35 | type Foo<T: Config> = StorageValue<_, u8, ResultQuery<Error<T>::NonExistentValue>>;
| +++
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment