-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Introduce dedicated exit codes #1749
Conversation
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.
Great PR! Exactly what we needed!
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.
Great improvement!
I have one suggestion that I think helps with readability, and a few questions.
mod-infra/src/main/scala/at/forsyte/apalache/infra/ExitCodes.scala
Outdated
Show resolved
Hide resolved
mod-infra/src/main/scala/at/forsyte/apalache/infra/ExitCodes.scala
Outdated
Show resolved
Hide resolved
mod-infra/src/main/scala/at/forsyte/apalache/infra/passes/PassChainExecutor.scala
Outdated
Show resolved
Hide resolved
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.
LGTM!
Co-authored-by: Shon Feder <shon@informal.systems>
Introduces the new return type PassResult = Either[TExitCode, TlaModule]. A pass returns either an exit code as Left(42) or the resulting TlaModule as Right(module). Co-authored-by: Shon Feder <shon@informal.systems>
Co-authored-by: Shon Feder <shon@informal.systems>
da3da08
to
5bd325b
Compare
Codecov Report
@@ Coverage Diff @@
## unstable #1749 +/- ##
============================================
+ Coverage 76.82% 76.89% +0.07%
============================================
Files 379 379
Lines 11826 11824 -2
Branches 570 549 -21
============================================
+ Hits 9085 9092 +7
+ Misses 2741 2732 -9
Continue to review full report at Codecov.
|
Closes #1392
Exit with dedicated error codes for
To this extent, we:
120
(the range 80–149 is unused by TLC) for type-checking errors.Pass
and its implementations to return anEither
encapsulating the exit code or pass result.Tests added for any new codemake fmt-fix
(or had formatting run automatically on all files edited)Documentation added for any new functionality