Closed svix-jplatte closed 3 months ago
Rebased to fix CI (hopefully).
I'm working on fixing the new CI failures ^^
Rebased to fix another round of CI failures, hoping it's the last time :crossed_fingers:
CI failed again /o\ (error)
Looks like a Windows-specific nextest bug? :melting_face:
And after another rebase, we have an ICE! Fix seems to be https://github.com/rust-lang/rust/pull/125493.
Finally the stream of unrelated CI failures has ended! :sweat_smile: Can this be merged now? :)
Hey @hds ! I see you merged this PR - can we get a fresh version of tracing-attributes that supports this?
This needs a new tracing
release, not tracing-attributes
.
Motivation
Currently, a keyword like
type
fails compilation as (a path segment of) a field name, for no clear reason. Trying to user#type
instead leads to ther#
being part of the field name, which is unhelpful¹.Solution
Don't require the field path to match a
macro_rules!
expr
, use repeatedtt
instead. I can't tell why this was ever required: The internal stringify macro was introduced in https://github.com/tokio-rs/tracing/commit/55091c92edb537bfc126e32f1f24acd614ad9fe0#diff-315c02cd05738da173861537577d159833f70f79cfda8cd7cf1a0d7a28ace31b with anexpr
matcher without any explanation, and no tests are failing from making it match upstream'sstringify!
input format.Special thanks to whoever implemented the unstable
macro-backtrace
feature in rustc, otherwise this would have been nigh impossible to track down!¹ this can likely be fixed too by some sort of "unraw" macro that turns
r#foo
intofoo
, but that's a separate change not made in this PR