-
Notifications
You must be signed in to change notification settings - Fork 59
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
Stack alloc: option to print in JSON format #656
base: main
Are you sure you want to change the base?
Conversation
07fa397
to
5c77bd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it weird to output this JSON data to the error output, mixed with other debug information not meant for machine consumption.
Wouldn’t it be more convenient for the user to specify a file name?
Also, there is no test of this functionality (therefore it will break).
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. |
494ba19
to
80c0dcc
Compare
The command line option is -json-stack-alloc filename
80c0dcc
to
b720328
Compare
We check that -print-stack-alloc and -json-stack-alloc stay in sync. The tests are not run by default by "make check".
I implemented what you suggested. And I added a test that checks that |
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. |
No description provided.