-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add a raw pretty printer for the metadata format #2326
Comments
it's not super hard. we have constants for the various tags and a global tag namespace. we could make a simpler "DTD" which is basically just a function from tag uint to an enum like this:
then we should be able to walk through and interpret things appropriately (if it is elts, we treat it like EBML text, otherwise interpret it as specified or just dumb the raw bytes) |
We should not be doing any of this stuff raw; we should be using auto_serialize and a serializer-backend. |
not really sure which milestone applies for developer convenience tools; maybe well-covered? |
not accepted for milestone; as ben points out, developer convenience is not part of milestones. |
Related to #8652. Could be useful, but for the effort it is probably more useful to vastly overhaul metadata... |
Triage: Could still be an issue. I'm not familiar with this part of the codebase and can't really find anything relevant. |
Triage: no change. There have been some large changes to metadata in the last few months, but that doesn't really apply here, to my knowledge. @lifthrasiir did you do anything related to this when you worked on reform? |
@steveklabnik I have used an ad-hoc decoder to analyze metadata bloat, but that's all. |
I also have a decoder at https://github.com/arielb1/rtypes |
Nice to have, but I don't think we need a tracking issue. |
update vscode settings Following [this recommendation](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.22target.22.20directory.20in.20rustc.20tree.3F/near/288428273) Cc rust-lang/rustc-dev-guide#1384
Maybe everybody else is really good at this, but I find it really frustrating to debug issues with inconsistencies (introduced by me) between the decoder and encoder. I spent several hours just now tracking down a problem that turned out to be because I was encoding a type with a tag around it, but the decoder was expecting the raw type string with no tag. If I'd had a way to dump out the EBML being encoded and decoded, this would have been easy to see. I asked someone (can't remember who) about this a while ago, and they said that pretty-printing EBML would be hard to do because there's no DTD. So, even if it would require effort, I'd really like a way to pretty-print EBML, since it seems to me like it would save debugging effort.
The text was updated successfully, but these errors were encountered: