can't put tracing behind a feature without an extra crate :(
This commit is contained in:
@@ -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" ]
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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::*;
|
||||
Reference in New Issue
Block a user