Skip to content

Commit

Permalink
Fix feature dependant import
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed Aug 25, 2023
1 parent 6b8133a commit 3962b69
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions polkadot/node/core/pvf/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,18 @@ pub mod worker;

pub use cpu_time::ProcessTime;

// Used by `decl_worker_main!`.
#[cfg(feature = "test-utils")]
pub use sp_tracing;
/// DO NOT USE - internal for macros only.
#[doc(hidden)]
pub mod __private {
pub mod sp_tracing {
pub fn try_init_simple() {
#[cfg(feature = "test-utils")]
{
let _ = ::sp_tracing::try_init_simple();
}
}
}
}

const LOG_TARGET: &str = "parachain::pvf-common";

Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/core/pvf/common/src/worker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ macro_rules! decl_worker_main {
}

fn main() {
$crate::sp_tracing::try_init_simple();
$crate::__private::sp_tracing::try_init_simple();

let args = std::env::args().collect::<Vec<_>>();
if args.len() == 1 {
Expand Down

0 comments on commit 3962b69

Please sign in to comment.