-
Notifications
You must be signed in to change notification settings - Fork 721
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
Bump matchers #3033
base: master
Are you sure you want to change the base?
Bump matchers #3033
Conversation
From a quick glance, it looks like this error type is on the |
You are correct. I thought Btw, I noted that you have a separate branch for the releases. Is this, if merged, (automatically) backported or should I create a similar PR against the v0.1.x-branch? |
(I'm just the |
Generally, the maintainers handle backporting to |
Yup, that's correct, this shouldn't be a breaking change AFAICT.
We merge PRs into the |
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.
Thanks for working on this!
It looks like the matchers::BuildError
type doesn't implement std::error::Error
, which breaks some code that uses ?
on it in a method that returns Box<dyn Error + Send + Sync>
: https://github.com/tokio-rs/tracing/actions/runs/9930533323/job/27719987902?pr=3033#step:7:218
I think that, in order to fix that, we should add our own private, internal error type for the FromStr
impl for MatchPatternthat wraps the
matchers::BuildErrorand implements
std::error::Error. This wrapper type doesn't need to be public, it just needs to be able to be converted into a
Box<dyn std::error::Error + Send + Sync>`
Why not go with the 90 loc in #2945 if this needs extra code anyways? |
I'll check with more rust-knowledgeable colleagues what this really means and see if I can implement that. :-) Then, I guess, one can compare with #2945. (It also seems to make sense, and possibly be easier, to have Edit: It seems like tracing/tracing-subscriber/Cargo.toml Line 46 in acf92ab
which in turn should import If I read the blame correct, this was included in Alternatively, I think (my detailed knowledge of the Rust eco-system is not 100%) one can add a dependency on |
Signed-off-by: Delan Azabani <dazabani@igalia.com>
@hawkw Would you mind starting the workflow? Interesting to see if this solves the issue and then we/you can discuss if it is an acceptable solution. |
Some usage in tracing expects this impl, as mentioned here: <tokio-rs/tracing#3033 (review)> It's provided when `regex-automata` has its `std` feature enabled. As `matchers` uses `std` itself, no reason not to allow `regex-automata` to do so also. Seems like the most straightforward way to address the problem: * avoids the need to create a wrapper type. * less fragile than bumping `tracing-subscriber`'s `regex` dependency to 1.9.0 and hoping that all semver-compatible versions will continue depending on `regex-automata` with this `std` feature enabled.
I'd also like to see the duplicate
I think that works now but is fragile.
I think that's better, or matchers always enabling |
Motivation
See #2945, this is an alternative to that.
Solution
Instead of removing it, make use of the recently released version.
(Not sure the tests pass as some tests fail on my Windows machine without this modification... So better to run it here.)
Edit:
some obvious errors, I'll update when I believe more in it working...Seems to be OK now. Same error, but it has changed name between 0.1 and 0.2, so not clear if one can include this in the 0.3-series...