Fix prepare_report.py
ignoring compiler exit code
#14731
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #14729.
After taking a closer look at the bytecode comparison failures in newAnalysis, turns out that it's not #13925 that's breaking the bytecode comparison. There's actually a small bug in the report script that went undiscovered until now.
The script was not taking into account the exit code from the compiler (which is irrelevant for Standard JSON interface but not for CLI). It went unnoticed because it does not make any difference under normal circumstances. If the compiler does not produce any outputs it's interpreted as an error anyway. Even with ICEs like
UnimplementedFeatureError
as long as the ICE happened before the compilation ended, it worked as expected.The new element in
newAnalysis
is that after #14659 we get an ICE only at the point where we request metadata. At this point the bytecode has already been successfully compiled and printed to the output so it looks to the script like a successful compilation missing metadata. The failure can only be detected by looking at the exit-code or trying to parse out the ICE from the CLI output (which the script intentionally does not do).