1
3
mirror of https://github.com/charliermarsh/ruff synced 2025-10-05 23:52:47 +02:00

[ruff,ty] Enable tracing's log feature

This has the effect of emitting tracing events via `log`
whenever there isn't an active tracing subscriber present.

This makes it so `ty_wasm` logs tracing messages to the
JavaScript console automatically (via our use of `console_log`).
This commit is contained in:
Andrew Gallant
2025-10-02 13:15:28 -04:00
committed by Andrew Gallant
parent f9688bd05c
commit 00c0c567dc
2 changed files with 6 additions and 0 deletions

1
Cargo.lock generated
View File

@@ -4449,6 +4449,7 @@ dependencies = [
"ruff_source_file",
"ruff_text_size",
"serde-wasm-bindgen",
"tracing",
"ty_ide",
"ty_project",
"ty_python_semantic",

View File

@@ -40,6 +40,7 @@ log = { workspace = true }
# See https://docs.rs/getrandom/latest/getrandom/#webassembly-support
getrandom = { workspace = true, features = ["wasm_js"] }
serde-wasm-bindgen = { workspace = true }
tracing = { workspace = true, features = ["log"] }
# Not a direct dependency but required to compile for Wasm.
uuid = { workspace = true, features = ["js"] }
@@ -50,3 +51,7 @@ wasm-bindgen-test = { workspace = true }
[lints]
workspace = true
[package.metadata.cargo-shear]
# Depended on only to enable `log` feature as of 2025-10-03.
ignored = ["tracing"]