-
-
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
Add the option --features
#1648
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.
Code LGTM, but I think we should discuss how this will evolve once the feature becomes stable. Do you have a plan for that?
UNRELEASED.md
Outdated
* Fix references to `--tune-here` (actually `--tuning-options`), see #1579 | ||
* Fix references to `--tune-here` (actually `--tuning-options`), see #1579 |
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.
We should either not commit these, or have a convention on file ending newlines.
mod-tool/src/main/scala/at/forsyte/apalache/tla/tooling/opt/General.scala
Outdated
Show resolved
Hide resolved
| - rows: enable row typing as explained in ADR-014 | ||
|""".stripMargin) |
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.
Won't this print an extra newline?
| - rows: enable row typing as explained in ADR-014 | |
|""".stripMargin) | |
| - rows: enable row typing as explained in ADR-014""".stripMargin) |
Codecov Report
@@ Coverage Diff @@
## unstable #1648 +/- ##
============================================
- Coverage 75.00% 74.90% -0.10%
============================================
Files 356 357 +1
Lines 11597 11611 +14
Branches 552 553 +1
============================================
- Hits 8698 8697 -1
- Misses 2899 2914 +15
Continue to review full report at Codecov.
|
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 (modulo fixing the output on that failing integration test)
I'm not sure why the mdx wildcard matching wasn't working as expected, but I think this test is as clear. The `ERROR` output was actually spurious, afaict, because CLI parsing errors are handled before we ever get to Apalache's internal tool executable error handling.
Moving the name and description into the `Feature` trait lets us ensure the inline documentation is up to date. Moving the conversion into the case class lets us reuse this logic in the configuration manager.
There's no need to call `ConfigManager` outside of `outputAndLogConfig` since its result is only used in the body of the latter.
Under the assumption that: - We shouldn't start measuring model checking time while setting up the output and processing configs. - We want to be able to reflect configuration failures in the exit code. - We don't need comments that repeat the name of functions.
Prior to this change errors resulting from invalid Apalache configuration files were resulting in uncaught exceptions. Now we return an `Either` from the configuration loading, and use that to determine whether we should continue running the command or report a configuration error.
The full error looks something like ``` 22:00:34.534 [main] ERROR at.forsyte.apalache.tla.Tool$ - Configuration error: at 'features.0': - (/home/sf/Sync/informal-systems/apalache/apalache-core/test/tla/./.apalache.cfg: 1) Cannot convert 'invalid-feature' to at.forsyte.apalache.tla.lir.Feature: . EXITCODE: ERROR (255) ``` We truncate it in the integration test to avoid platform-specific information breaking the integration tests.
Hopefully will account for stderr output from docker container
…neral.scala Co-authored-by: Thomas Pani <thomas@informal.systems>
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.
Leaving a note that I have requested a change set via #1652
@shonfeder quick workflow question: I think we don't necessarily need to block on this? |
…stions Integrate features flag into ConfigManager
Closes #1647. As discussed in #401, this PR introduces the option
--features
that lets us pass experimental features to the tool. The only supported feature inrows
, which is parsed asRowsFeature
. When we want to add new features, we have to extend the traitFeature
with a case class and update the parser inGeneral
.For the moment, I am not adding any documentation to the user manual. I will extend the manual section on types, when we start the transition period to Type System 1.2.
make fmt-fix
(or had formatting run automatically on all files edited)