Skip to content
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

Log and exit error if --compile (PVL-to-Java translation) mode fails #1278

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

wandernauta
Copy link
Contributor

Before, the mode would silently return success (0) even if compilation actually failed, for example because of a syntax error. This brings behavior more in line with the other modes.

Before, the mode would silently return success even if compilation actually failed, for example because of a syntax error. This brings behavior more in line with the other modes.
@bobismijnnaam
Copy link
Contributor

Looks good. If you don't mind changing the PR to also print the systemerror when it is encountered, and return EXIT_CODE_ERROR in that case, the PR can be merged.

By the way, general request: could you leave a comment on the PR when you're finished? Most of your PRs are so small I can never quite tell if you're finished or not, so it would be helpful if you could mark your PR as officially finished after the last PR. Or you could mark it as draft when you create the PR, and then unmark it as draft when you're finished. Whatever you prefer. Other than that, keep up the good work :)

@wandernauta
Copy link
Contributor Author

Thanks for taking a look! I do try to keep PRs as small as possible :) In future, I'll create PRs as draft and un-draft them when I think they're ready.

In practice, system errors are already printed and exit-1'ed because the exception bubbles to vct/main/Main.scala:53, which does the whole "VerCors has crashed" banner and GitHub link - the same as Verify mode, basically.

Would you like to instead see that system errors are caught inside Compile.scala itself, so that that banner is not printed, only the error itself?

@bobismijnnaam
Copy link
Contributor

Ah, you're right. LGTM

@bobismijnnaam bobismijnnaam merged commit 14eefb2 into utwente-fmt:dev Nov 19, 2024
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants