From 820b283cf899ea0c890d423d8994d9676f6af6ed Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Tue, 2 Jun 2020 15:56:13 -0700 Subject: [PATCH] can't put tracing behind a feature without an extra crate :( --- crates/wiggle/Cargo.toml | 8 ++------ crates/wiggle/src/lib.rs | 4 +++- crates/wiggle/src/tracing.rs | 11 ----------- 3 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 crates/wiggle/src/tracing.rs diff --git a/crates/wiggle/Cargo.toml b/crates/wiggle/Cargo.toml index 07566bb338..b376d8d4b9 100644 --- a/crates/wiggle/Cargo.toml +++ b/crates/wiggle/Cargo.toml @@ -14,7 +14,7 @@ include = ["src/**/*", "LICENSE"] thiserror = "1" witx = { path = "../wasi-common/WASI/tools/witx", version = "0.8.5", optional = true } wiggle-macro = { path = "macro", version = "0.17.0" } -tracing_crate = { version = "0.1.14", optional = true, package = "tracing" } +tracing = { version = "0.1.14" } [badges] maintenance = { status = "actively-developed" } @@ -29,9 +29,5 @@ proptest = "0.9" # users of wiggle are not forced to take a direct dependency on the `witx` # crate unless they want it. wiggle_metadata = ['witx', "wiggle-macro/wiggle_metadata"] -# The wiggle proc-macro emits code which may transitively depend on the -# `tracing` crate, via `wiggle::tracing`. When this feature is not enabled, -# a no-op equivelant to the tracing macros is provided instead. -tracing = [ "tracing_crate" ] -default = ["wiggle_metadata", "tracing"] +default = ["wiggle_metadata" ] diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index 9e6e9933fa..98f31ee171 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -15,7 +15,9 @@ mod borrow; mod error; mod guest_type; mod region; -pub mod tracing; +pub mod tracing { + pub use tracing::*; +} pub use borrow::BorrowChecker; use borrow::BorrowHandle; diff --git a/crates/wiggle/src/tracing.rs b/crates/wiggle/src/tracing.rs deleted file mode 100644 index e9b5c6951d..0000000000 --- a/crates/wiggle/src/tracing.rs +++ /dev/null @@ -1,11 +0,0 @@ -#[cfg(feature = "tracing")] -pub use tracing_crate::*; - -#[cfg(not(feature = "tracing"))] -mod noop_tracing { - // TODO fill in rest of the noop interface - // idk how to do this because macro_rules! / #[macro_export] doesn't follow the usual module - // visibility rules. -} -#[cfg(not(feature = "tracing"))] -pub use noop_tracing::*;