Restrict sysroot crate imports to those defined in this repo.
It's common to import dependencies from the sysroot via `extern crate` rather than use an explicit cargo dependency, when it's necessary to use the same dependency version as used by rustc itself. However, this is dangerous for crates.io crates, since rustc may not pull in the dependency on some targets, or may pull in multiple versions. In both cases, the `extern crate` fails to resolve. To address this, re-export all such dependencies from the appropriate `rustc_*` crates, and use this alias from crates which would otherwise need to use `extern crate`.
This commit is contained in:
parent
e100792918
commit
c6a952159f
51 changed files with 193 additions and 151 deletions
|
|
@ -6,6 +6,7 @@ edition = "2024"
|
|||
[dependencies]
|
||||
# tidy-alphabetical-start
|
||||
tracing = "0.1.41"
|
||||
tracing-core = "0.1.34"
|
||||
tracing-subscriber = { version = "0.3.3", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
|
||||
tracing-tree = "0.3.1"
|
||||
# tidy-alphabetical-end
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ use tracing_subscriber::filter::{Directive, EnvFilter, LevelFilter};
|
|||
use tracing_subscriber::fmt::FmtContext;
|
||||
use tracing_subscriber::fmt::format::{self, FormatEvent, FormatFields};
|
||||
use tracing_subscriber::layer::SubscriberExt;
|
||||
// Re-export tracing
|
||||
pub use {tracing, tracing_core, tracing_subscriber};
|
||||
|
||||
/// The values of all the environment variables that matter for configuring a logger.
|
||||
/// Errors are explicitly preserved so that we can share error handling.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue