-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use serialisation for save_analysis #18582
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
Comments
cc me |
Willing to work on this too :) |
@sinistersnare Wanna split the work ? Or did you cc just in order to see the progress ? |
Sure. this could be interesting. |
Is this still being worked on or abandoned? |
@sinistersnare @gamazeps ? (See previous comment) |
Oh goodness, I forgot about this :) I can start work on this next week, but if you want to take this @rolandshoemaker, than feel free. Sorry! |
I would like to work on this. |
Please do, I have no more plans of contributing. |
@nick29581 Do I need to keep csv support? |
@Potpourri tl;dr: no. What would be ideal would be to have a generic serialisation API which could serialise to JSON, CSV or whatever else. I'm not sure if that is possible or how easy it is (@erickt might be able to advise). I'd be pretty happy with just JSON, as long as it wasn't too hard-wired in. (You could also earn mega-love from me by converting DXR to understand JSON rather than CSV as a follow up, but I'm also happy to do that). |
Triage: looks like we're still using the CSV format. |
In #31838, I introduced the For inspiration, see csv_dumper.rs. |
I have a PR done now which adds JSON emission. It uses serialisation for that, but it doesn't really fix this issue. I would like to see save-analysis refactored so that rather than using the We should also use these 'external' data structures for the API, rather than exposing the internal ones like we do at the moment. |
save-analysis: dump in JSON format cc #18582
Oh yeah, this is all done now, thanks! |
Currently we use an ad hoc csv format for dumping analysis data (see rustc::middle::save::recorder). It would be better to use libserialize (or serde) for the dumping step so we can easily provide data in different formats.
By default, I think save_analysis should output JSON, since that seems to be the current hotness for this sort of thing.
I expect this to be not too hard, but non-trivial, and possibly a little bit tedious.
The text was updated successfully, but these errors were encountered: