-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
C-featureCategory: feature requestCategory: feature request
Description
I'm using the ra_ap_syntax crate published from the crates/syntax dir in this repo and would like if it could feature-gate the tracing instrumentation (so I can avoid the dependencies it induces). This would reduce the crate tree size considerably.
I noticed the parser crate appeared to already do so:
rust-analyzer/crates/parser/Cargo.toml
Line 30 in 5062185
| default = ["tracing"] |
but then it seems to have been unfinished, the feature was never used in the code:
rust-analyzer/crates/parser/src/lib.rs
Line 92 in 5062185
| let _p = tracing::info_span!("TopEntryPoint::parse", ?self).entered(); |
As such the parser crate did not compile when the tracing feature is configured out (--no-default-features).
louis 🚶 ~/lab/rust-analyzer/crates/parser $ cargo check --no-default-features
Checking parser v0.0.0 (/home/louis/lab/rust-analyzer/crates/parser)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `tracing`
--> crates/parser/src/lib.rs:92:18
|
92 | let _p = tracing::info_span!("TopEntryPoint::parse", ?self).entered();
| ^^^^^^^ use of unresolved module or unlinked crate `tracing`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `tracing`
--> crates/parser/src/shortcuts.rs:29:18
|
29 | let _p = tracing::info_span!("LexedStr::to_input").entered();
| ^^^^^^^ use of unresolved module or unlinked crate `tracing`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `tracing`
--> crates/parser/src/lexed_str.rs:38:18
|
38 | let _p = tracing::info_span!("LexedStr::new").entered();
| ^^^^^^^ use of unresolved module or unlinked crate `tracing`
- Fixed in PR fix(parser): feature gate tracing spans #21108 for parser crate and updated syntax crate with a new tracing feature to do likewise
Metadata
Metadata
Assignees
Labels
C-featureCategory: feature requestCategory: feature request