mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
chore(resolver): remove tracing_subscriber (#1362)
this is no longer required for rspack
This commit is contained in:
parent
c6957ae8f1
commit
3bfe05ec7c
5 changed files with 0 additions and 21 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -1826,7 +1826,6 @@ dependencies = [
|
|||
"serde_json",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"vfs",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@ indexmap = { workspace = true, features = ["serde"] } # serde for Deserialize fr
|
|||
dunce = "1.0.4" # Normalize Windows paths to the most compatible format, avoiding UNC where possible
|
||||
once_cell = "1.18.0" # Use `std::sync::OnceLock::get_or_try_init` when it is stable.
|
||||
thiserror = { workspace = true }
|
||||
tracing-subscriber = { workspace = true, optional = true, features = ["env-filter"] }
|
||||
|
||||
[dev-dependencies]
|
||||
vfs = "0.10.0" # for testing with in memory file system
|
||||
|
||||
[features]
|
||||
tracing-subscriber = ["dep:tracing-subscriber"]
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
* support paths alias defined in `tsconfig.compilerOptions.paths`
|
||||
* support project references defined `tsconfig.references`
|
||||
* contains `tracing` instrumentation
|
||||
* Install `tracing_subscriber` in your app
|
||||
* or opt-in to the subscriber with `--features tracing-subscriber` and use `OXC_RESOLVER=DEBUG` env variable
|
||||
|
||||
#### Resolver Options
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ mod package_json;
|
|||
mod path;
|
||||
mod resolution;
|
||||
mod specifier;
|
||||
#[cfg(feature = "tracing-subscriber")]
|
||||
mod tracing_subscriber;
|
||||
mod tsconfig;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
@ -142,8 +140,6 @@ impl<Fs: FileSystem + Default> Default for ResolverGeneric<Fs> {
|
|||
|
||||
impl<Fs: FileSystem + Default> ResolverGeneric<Fs> {
|
||||
pub fn new(options: ResolveOptions) -> Self {
|
||||
#[cfg(feature = "tracing-subscriber")]
|
||||
tracing_subscriber::init();
|
||||
Self { options: options.sanitize(), cache: Arc::new(Cache::default()) }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
use once_cell::sync::OnceCell;
|
||||
use tracing_subscriber::{fmt, prelude::*, registry, EnvFilter};
|
||||
|
||||
static SUBSCRIBER: OnceCell<()> = OnceCell::new();
|
||||
|
||||
pub fn init() {
|
||||
SUBSCRIBER.get_or_init(|| {
|
||||
registry().with(fmt::layer()).with(EnvFilter::from_env("OXC_RESOLVER")).init();
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue