-
Notifications
You must be signed in to change notification settings - Fork 745
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
core: introduce statically discoverable metadata #969
Comments
There are possible future extensions to const eval that are completely in the hypothetical spectrum right now: rust-lang/const-eval#25 (comment). Some variants of this would really help with the problem we have here. Basically each call site would write to a file using a specific naming pattern and then we could collect all these files in the final crate. While we can add a proc macro and invoke it from the The only workable solution I can come up with is actually exactly what eddyb suggests in rust-lang/const-eval#25 (comment) but done with proc macro attributes. So we basically have only a single The thing I don't really know is how we're going to move this data across crate boundaries in a non-manual way. We can start out by requiring the |
My assumption is that, since the required const-eval features that @oli-obk mentions are currently hypothetical, we're not going to be able to implement this for |
yes, this is entirely hypothetical and I don't see any of my suggestions happening soon |
Feature Request
Crates
tracing-core
Motivation
A common complaint with
tracing
's filtering behavior is that feedback for invalid filters can be silent—there is no diagnostic saying "this target does not exist" becausetracing-core
cannot tell the difference between a nonexistent callsite and a yet-to-be-discovered callsite, as callsite registration occurs as the instrumented code executes for the first time, not ahead of time.To address this issue, this issue proposes that all callsites became statically visible and discoverable at program startup. This would allow other, higher-level libraries to find all callsites and implement interesting functionality such as:
tracing
-emitted data that know which queries are valid and invalid.Proposal
The implementation details might be related to #860. Here are two options that I know of:
Alternatives
The text was updated successfully, but these errors were encountered: