-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Consider mangling ID's in rustdoc-json #91609
Copy link
Copy link
Closed
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.The problem with this is that their is no obligation to treet the ID's as opaque (for a concreet example see https://github.com/scrabsha/scrabsha.github.io/pull/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:0lets the user know things, wherasa3aefbcbf31fa0bc12b9a73bc9d67976(md5 hash) doesnt.Potential Drawbacks
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