Description
Currently JSON ID
's are (approximatly) the underling DefId's which means they are not realy opaque, despite what we've said in the RFC.
They happen to be the compiler internal DefId for that item, but in the JSON blob they should be treated as opaque as they aren't guaranteed to be stable across compiler invocations
The problem with this is that their is no obligation to treet the ID's as opaque (for a concreet example see scrabsha/scrabsha.github.io#2). If we want to garentee our ability to change the ID format, we should make it so that no one relies on the specific values of ID's by making them not cary information. Eg 0:0
lets the user know things, wheras a3aefbcbf31fa0bc12b9a73bc9d67976
(md5 hash) doesnt.
Potential Drawbacks
- Non determinism
- Harder to debug
- Slower to build
- Larger output
Which of these are actualy a problem, or just unfounded concerns I'm not sure:
If you want to change this: heres the places to look:
rust/src/librustdoc/json/mod.rs
Line 219 in 0fb1c37
rust/src/librustdoc/json/conversions.rs
Line 183 in 0fb1c37
I'm not sure if this is a good idea, and would love feedback
@rustbot modify labels: +C-discussion +A-rustdoc-json