New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal: remove spurious regex dependency #15071
Conversation
matklad
commented
Jun 17, 2023
- replace tokio's env-filter with a smaller&simpler targets filter
- reshuffle logging infra a bit to make sure there's only a single place where we read environmental variables
- use anyhow::Result in rust-analyzer binary
Logger { filter, file } | ||
} | ||
|
||
pub(crate) fn install(self) -> Result<()> { | ||
// The meaning of CHALK_DEBUG I suspected is to tell chalk crates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is a bit confusing now that the CHALK_DEBUG var is being read from somewhere else
LspError, Result, | ||
LspError, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing this refactor, I wonder if having a replace use with qualified name
assist would be nice to have(reverse of replace_qualified_name_with_use
)
- replace tokio's env-filter with a smaller&simpler targets filter - reshuffle logging infra a bit to make sure there's only a single place where we read environmental variables - use anyhow::Result in rust-analyzer binary
Landing as this seems somewhat conflict prone @bors r+ |
☀️ Test successful - checks-actions |
let filter: tracing_subscriber::filter::Targets = | ||
env::var("CHALK_DEBUG").ok().and_then(|it| it.parse().ok()).unwrap_or_default(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI seems to be spamming the logs for this now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not the CHALK_DEBUG part, we seem to log all salsa traces ...
.with_env_filter(tracing_subscriber::EnvFilter::from_env("RA_LOG")) | ||
// FIXME: I am not smart enough to figure out how to use this with | ||
// `tracing_subscriber::filter::Targets`. | ||
// | ||
// .with_env_filter(tracing_subscriber::EnvFilter::from_env("RA_LOG")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I guess because of this? We now don't filter in slow tests so we get 30k lines of salsa logs 😅