Skip to content

Commit

Permalink
Fix tokio-console
Browse files Browse the repository at this point in the history
  • Loading branch information
mre committed Aug 7, 2024
1 parent 9caa461 commit 40383fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
# Required for tokio-console support
rustflags = ["--cfg", "tokio_unstable"]
6 changes: 2 additions & 4 deletions lychee-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ features = ["fmt", "env-filter"]
optional = true

[features]
# This is currently unstable and requires `RUSTFLAGS="--cfg tokio_unstable"`
# As such, it needs to bexplicitly enabled to avoid breaking the tests with `--all-features`.
#tokio-console = ["dep:console-subscriber", "dep:tracing-subscriber"]
tokio-console = ["dep:console-subscriber", "dep:tracing-subscriber"]

# Compile and statically link a copy of OpenSSL.
vendored-openssl = ["openssl-sys/vendored"]
Expand Down Expand Up @@ -112,4 +110,4 @@ required-features = ["check_example_domains"]
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }{ archive-suffix }"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"
pkg-fmt = "tgz"
2 changes: 1 addition & 1 deletion lychee-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ enum ExitCode {
const LYCHEEIGNORE_COMMENT_MARKER: &str = "#";

fn main() -> Result<()> {
#[cfg(all(feature = "tokio-console"))]
#[cfg(feature = "tokio-console")]
console_subscriber::init();

// std::process::exit doesn't guarantee that all destructors will be ran,
Expand Down

0 comments on commit 40383fa

Please sign in to comment.