-
Notifications
You must be signed in to change notification settings - Fork 47
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
Could not parse event_id
. Found ASCII control character in <text>
#207
Comments
The relevant code looks like https://github.com/rust-lang/rust/blob/3df55382d46842dcaeff48ea83e0107183550dd6/compiler/rustc_middle/src/ty/print/pretty.rs#L999-L1003, which ... seems fine? cc @compiler-errors, I see you were the last one to touch that pretty-printing code. |
If this is the consequence of the pretty printing infrastructure, then I'd expect we'd see in in more places than just measureme. |
So it wasn't |
I don't remember the details of the encoding but I do remember that it assigns special meaning to certain ASCII control characters in order to be space efficient. I doubt, however, that newlines are affected by that. I can look into relaxing the checks here, but unless we consider it high priority, it will probably be a while before I get to that. |
Yes they are. I did actually run into this while first wiring up cranelift's profiling system to |
What I mean is: I doubt that newlines really have a reserved meaning in the encoding -- so it's probably fine to relax the requirements here 🙂 |
…=wesleywiser Don't print newlines in APITs This is kind of a hack, but it gets the job done because the only "special" formatting that (afaict) `rustc_ast_pretty` does is break with newlines sometimes. Fixes rust-lang/measureme#207
Should this issue be kept open for when someone does need a newline in an argument? |
@michaelwoerister made a suggestion last night but forgot to post the PR. posted it now. |
It got closed again by a subtree sync... |
I am not sure whether this is a rustc bug or a measureme bug so I'm reporting it here under the theory that it's more likely to be seen by the right people :)
I ran
on rust-lang/rust@ba6f5e3. That generated a .mm_profdata file that the measureme tools fail to parse:
It looks like
FnOnce
impls are getting an extra newline generated at the end. That seems like a bug we should fix in rustc, but not such a bad bug that it should prevent measureme from generating a report - could we translated it to an ASCII space instead, maybe?The text was updated successfully, but these errors were encountered: