You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, tracing's event macros support outdated syntax where fields are delimited using {}. This was added due to parsing ambiguities in the macros which we have since resolved, and it is no longer necessary when writing events with messages and fields. The macros continue to support this syntax for backwards-compatibility reasons. This adds unnecessary complexity to the macros.
Proposal
In preparation for an eventual breaking change to tracing, we should consider deprecating this syntax. We could have the macro arms that use it generate an import of a hidden deprecated type, or something, so that users get a deprecation warning. Then, when we release 0.2, we can stop supporting backwards compatibility with this syntax.
Alternatives
Alternatively, we can not do this. There are two potential ways we would "not do this".
We could just not drop support for this syntax in 0.2. The macros would continue to support the curly brace syntax. This would mean we would continue having to support this complexity, but we could remove it in a hypothetical future 0.3 release or something.
We could just remove this syntax as part of 0.2 without deprecating it first. This is technically semver-compliant. However, I'd prefer to do a proper deprecation cycle, since it gives users a warning that they should remove uses of this syntax, before we just remove it.
The text was updated successfully, but these errors were encountered:
Feature Request
Crates
tracing
Motivation
Currently,
tracing
's event macros support outdated syntax where fields are delimited using{
}
. This was added due to parsing ambiguities in the macros which we have since resolved, and it is no longer necessary when writing events with messages and fields. The macros continue to support this syntax for backwards-compatibility reasons. This adds unnecessary complexity to the macros.Proposal
In preparation for an eventual breaking change to
tracing
, we should consider deprecating this syntax. We could have the macro arms that use it generate an import of a hidden deprecated type, or something, so that users get a deprecation warning. Then, when we release 0.2, we can stop supporting backwards compatibility with this syntax.Alternatives
Alternatively, we can not do this. There are two potential ways we would "not do this".
We could just not drop support for this syntax in 0.2. The macros would continue to support the curly brace syntax. This would mean we would continue having to support this complexity, but we could remove it in a hypothetical future 0.3 release or something.
We could just remove this syntax as part of 0.2 without deprecating it first. This is technically semver-compliant. However, I'd prefer to do a proper deprecation cycle, since it gives users a warning that they should remove uses of this syntax, before we just remove it.
The text was updated successfully, but these errors were encountered: