mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-02 04:48:07 +00:00
## Summary [tracing](https://github.com/tokio-rs/tracing) is library for logging, tracing and related features that has a large ecosystem. Using [tracing-subscriber](https://docs.rs/tracing-subscriber) and [tracing-indicatif](https://github.com/emersonford/tracing-indicatif), we get a nice logging output that you can configure with `RUST_LOG` (e.g. `RUST_LOG=debug`) and a live look into the formatter progress. Default:  `RUST_LOG=debug`:  It's easy to see in this output which files take a disproportionate amount of time. [Peek 2023-07-30 14-35.webm](2c92db5c-1354-465b-a6bc-ddfb281d6f9d) It opens up further integration with the tracing ecosystem, [tracing-timing](https://docs.rs/tracing-timing/latest/tracing_timing/) and [tokio-console](https://github.com/tokio-rs/console) can e.g. show histograms and the json output allows us building better pipelines than grepping a log file. One caveat is using `parent: None` for the logging statements because tracing subscriber does not allow deactivating the span without reimplementing all the other log message formatting, too, and we don't need span information, esp. since it would currently show the progress bar span. ## Test Plan n/a
18 lines
557 B
TOML
18 lines
557 B
TOML
[package]
|
|
name = "ruff_shrinking"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
anyhow = { workspace = true }
|
|
clap = { workspace = true }
|
|
fs-err = "2.9.0"
|
|
regex = { workspace = true }
|
|
ruff_python_ast = { path = "../ruff_python_ast" }
|
|
ruff_python_parser = { path = "../ruff_python_parser" }
|
|
ruff_text_size = { path = "../ruff_text_size" }
|
|
shlex = "1.1.0"
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true, features = ["env-filter"] }
|