diff --git a/prdoc/pr_7069.prdoc b/prdoc/pr_7069.prdoc new file mode 100644 index 000000000000..a0fc5cafb020 --- /dev/null +++ b/prdoc/pr_7069.prdoc @@ -0,0 +1,10 @@ +title: Fix defensive! macro to be used in umbrella crates +doc: +- audience: Runtime Dev + description: |- + PR for #7054 + + Replaced frame_support with $crate from @gui1117 's suggestion to fix the dependency issue +crates: +- name: frame-support + bump: patch diff --git a/substrate/frame/support/src/traits/misc.rs b/substrate/frame/support/src/traits/misc.rs index 0dc3abdce956..9fef4383ad67 100644 --- a/substrate/frame/support/src/traits/misc.rs +++ b/substrate/frame/support/src/traits/misc.rs @@ -66,7 +66,7 @@ impl Get for VariantCountOf { #[macro_export] macro_rules! defensive { () => { - frame_support::__private::log::error!( + $crate::__private::log::error!( target: "runtime::defensive", "{}", $crate::traits::DEFENSIVE_OP_PUBLIC_ERROR @@ -74,7 +74,7 @@ macro_rules! defensive { debug_assert!(false, "{}", $crate::traits::DEFENSIVE_OP_INTERNAL_ERROR); }; ($error:expr $(,)?) => { - frame_support::__private::log::error!( + $crate::__private::log::error!( target: "runtime::defensive", "{}: {:?}", $crate::traits::DEFENSIVE_OP_PUBLIC_ERROR, @@ -83,7 +83,7 @@ macro_rules! defensive { debug_assert!(false, "{}: {:?}", $crate::traits::DEFENSIVE_OP_INTERNAL_ERROR, $error); }; ($error:expr, $proof:expr $(,)?) => { - frame_support::__private::log::error!( + $crate::__private::log::error!( target: "runtime::defensive", "{}: {:?}: {:?}", $crate::traits::DEFENSIVE_OP_PUBLIC_ERROR,