[big refactor] Remove crate aliasing. (#4395)

* Rename: Phase 1.

* Unify codec.

* Fixing: Phase 2

* Fixing: Phase 3.

* Fixing: Phase 4.

* Fixing: Phase 5.

* Fixing: Phase 6.

* Fixing: Phase 7.

* Fixing: Phase 8. Tests

* Fixing: Phase 9. Tests!!!

* Fixing: Phase 10. Moar tests!

* Finally done!

* More fixes.

* Rename primitives:: to sp_core::

* Apply renames in finality-grandpa.

* Fix benches.

* Fix benches 2.

* Revert node-template.

* Fix frame-system in our modules.
This commit is contained in:
Tomasz Drwięga
2019-12-16 13:36:49 +01:00
committed by Gavin Wood
parent f14d98a439
commit 8778ca7dc8
485 changed files with 4023 additions and 4005 deletions
+3 -3
View File
@@ -25,7 +25,7 @@
//! this that are described below.
//!
//! First component to utilize debug-printing and loggin is actually
//! located in `primitives` crate: `primitives::RuntimeDebug`.
//! located in `primitives` crate: `sp_core::RuntimeDebug`.
//! This custom-derive generates `core::fmt::Debug` implementation,
//! just like regular `derive(Debug)`, however it does not generate
//! any code when the code is compiled to WASM. This means that
@@ -37,7 +37,7 @@
//! ```rust,no_run
//! use frame_support::debug;
//!
//! #[derive(primitives::RuntimeDebug)]
//! #[derive(sp_core::RuntimeDebug)]
//! struct MyStruct {
//! a: u64,
//! }
@@ -68,7 +68,7 @@
//! ```rust,no_run
//! use frame_support::debug::native;
//!
//! #[derive(primitives::RuntimeDebug)]
//! #[derive(sp_core::RuntimeDebug)]
//! struct MyStruct {
//! a: u64,
//! }
+2 -1
View File
@@ -530,7 +530,7 @@ macro_rules! __impl_outer_event_json_metadata {
$crate::event::OuterEventMetadata {
name: $crate::event::DecodeDifferent::Encode(stringify!($event_name)),
events: $crate::event::DecodeDifferent::Encode(&[
("system", $crate::event::FnEncode(system::Event::metadata))
("system", $crate::event::FnEncode($system::Event::metadata))
$(
, (
stringify!($module_name),
@@ -542,6 +542,7 @@ macro_rules! __impl_outer_event_json_metadata {
])
}
}
#[allow(dead_code)]
pub fn __module_events_system() -> &'static [$crate::event::EventMetadata] {
system::Event::metadata()
+1 -1
View File
@@ -19,7 +19,7 @@ pub use crate::sp_std::vec::Vec;
#[doc(hidden)]
pub use crate::sp_runtime::traits::{Block as BlockT, Extrinsic};
#[doc(hidden)]
pub use inherents::{InherentData, ProvideInherent, CheckInherentsResult, IsFatalError};
pub use sp_inherents::{InherentData, ProvideInherent, CheckInherentsResult, IsFatalError};
/// Implement the outer inherent.
+1 -1
View File
@@ -39,7 +39,7 @@ pub use once_cell;
pub use paste;
#[cfg(feature = "std")]
#[doc(hidden)]
pub use state_machine::BasicExternalities;
pub use sp_state_machine::BasicExternalities;
#[doc(hidden)]
pub use sp_io::storage::root as storage_root;
#[doc(hidden)]
+1 -1
View File
@@ -27,7 +27,7 @@
use crate::sp_std::prelude::*;
use codec::{Codec, Encode, Decode};
pub use primitives::storage::ChildInfo;
pub use sp_core::storage::ChildInfo;
/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.
pub fn get<T: Decode + Sized>(
+1 -1
View File
@@ -423,7 +423,7 @@ pub trait StoragePrefixedMap<Value: FullCodec> {
#[cfg(test)]
mod test {
use primitives::hashing::twox_128;
use sp_core::hashing::twox_128;
use sp_io::TestExternalities;
use crate::storage::{unhashed, StoragePrefixedMap};
+1 -1
View File
@@ -20,7 +20,7 @@
use sp_std::{prelude::*, result, marker::PhantomData, ops::Div, fmt::Debug};
use codec::{FullCodec, Codec, Encode, Decode};
use primitives::u32_trait::Value as U32;
use sp_core::u32_trait::Value as U32;
use sp_runtime::{
ConsensusEngineId,
traits::{MaybeSerializeDeserialize, SimpleArithmetic, Saturating},