Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a raw pretty printer for the metadata format #2326
Comments
This comment has been minimized.
This comment has been minimized.
|
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) |
This comment has been minimized.
This comment has been minimized.
|
We should not be doing any of this stuff raw; we should be using auto_serialize and a serializer-backend. |
This comment has been minimized.
This comment has been minimized.
|
not really sure which milestone applies for developer convenience tools; maybe well-covered? |
This comment has been minimized.
This comment has been minimized.
|
not accepted for milestone; as ben points out, developer convenience is not part of milestones. |
This comment has been minimized.
This comment has been minimized.
|
Related to #8652. Could be useful, but for the effort it is probably more useful to vastly overhaul metadata... |
This comment has been minimized.
This comment has been minimized.
|
Triage: Could still be an issue. I'm not familiar with this part of the codebase and can't really find anything relevant. |
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
@steveklabnik I have used an ad-hoc decoder to analyze metadata bloat, but that's all. |
This comment has been minimized.
This comment has been minimized.
|
I also have a decoder at https://github.com/arielb1/rtypes |
This comment has been minimized.
This comment has been minimized.
|
Nice to have, but I don't think we need a tracking issue. |
catamorphism commentedMay 2, 2012
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.