Stack alloc: option to print in JSON format
Ok, I will print to a dedicated file.
What do you have in mind for the test? Testing this is valid JSON, that it prints the same information that the option we already have, something else?
I don’t have anything in mind beyond the following invariant of software engineering: untested features eventually break.
I implemented what you suggested.
And I added a test that checks that -print-stack-alloc and -json-stack-alloc stay in sync. I find the implementation dirty (the parsing of JSON is written in OCaml and I call ocaml to interpret it), but I don't know how to do it in a cleaner way. The test is not run by default because I don't think we will touch that part really often.
Are we happy with this one ?
I now regret to have suggested to test that feature…
If you find the tests too ugly, I can just drop them. Another option, suggested by Benjamin last week, is to test the output like we do for the SCT checker.
I'd like to close this one, I think the consensus is rejection. @bgregoir, you mentioned that you wanted to discuss with Tiago about this PR, did you do it?
@bgregoir ping
I forgot, I should do it.
This has been stale for too long, I'm closing. Please reopen if needed.