Skip to content

Commit

Permalink
pr doc, remove try_runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
PolkadotDom committed Jan 11, 2025
1 parent 17bf92a commit ca63d0b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
16 changes: 16 additions & 0 deletions prdoc/pr_7119.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: Add migrations prelude to frame umbrella crate

doc:
- audience: Runtime Dev
description: |
Adds the `migrations_prelude` to the frame umbrella crate. This prelude can now be imported
into your pallet's migration.rs file, providing you the necessary types. This update also removes the
`try_runtime` module from the umbrella crate. You can now find those types under `migrations_prelude`
or `testing_prelude`.

crates:
- name: pallet-multisig
bump: none
9 changes: 2 additions & 7 deletions substrate/frame/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
//! This crate is organized into 3 stages:
//!
//! 1. preludes: `prelude`, `testing_prelude`, `runtime::prelude`, `benchmarking`,
//! `weights_prelude`, `migrations_prelude`, and `try_runtime`.
//! `weights_prelude`, and `migrations_prelude`.
//! 2. domain-specific modules: `traits`, `hashing`, `arithmetic` and `derive`.
//! 3. Accessing frame/substrate dependencies directly: `deps`.
//!
Expand Down Expand Up @@ -244,11 +244,6 @@ pub mod prelude {
};
}

#[cfg(any(feature = "try-runtime", test))]
pub mod try_runtime {
pub use sp_runtime::TryRuntimeError;
}

/// Prelude to be included in the `benchmarking.rs` of a pallet.
///
/// It supports both the `benchmarking::v1::benchmarks` and `benchmarking::v2::benchmark` syntax.
Expand Down Expand Up @@ -341,7 +336,7 @@ pub mod testing_prelude {
pub use sp_runtime::TryRuntimeError;
}

/// Prelude to be included in the `migration.rs` of each pallet.
/// Prelude to be included in the `migrations.rs` file of each pallet.
///
/// ```
/// pub use polkadot_sdk_frame::migrations_prelude::*;
Expand Down

0 comments on commit ca63d0b

Please sign in to comment.