Repository navigation
Conversation
The skill runs TLC with tla-ts through npx by default, so it needs neither Java nor mise. tla-ts reproduces TLC 1.7.4 without its jar. JAVA or TLA2TOOLS still runs TLC with Java, and so does a failed npx install.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Statechart needs Java and mise to check a spec. To repro: on a machine without mise, unset
JAVAandTLA2TOOLS, then runscripts/statecharton any spec. It fails with "Cannot find TLC: mise install failed".This PR runs TLC with tla-ts instead, which reproduces TLC 1.7.4 in Node. Checks also take about half as long.
This started from poteto's original tweet.
What changed
By default, the skill installs tla-ts with npx and runs it in place of Java. Setting
JAVAorTLA2TOOLSstill runs Java, and so does a failed npx install.Blast Radius
The first run still needs the network (for npx instead of mise). The skill installs the latest tla-ts, so a tla-ts release can change its output.
The npx lookup needs a POSIX shell, so #1147 (Windows) would need another lookup. #1017 edits the same lines of
findTlc.Speed
These are medians of 5 runs with tla-ts cached. A first run with an empty npm cache took 1.4 s.
Verification
All 63 corpus and edge-case specs give identical output with Java and tla-ts (exit status, stdout, stderr, chart, report, and TLC output). A fake
javaonPATHwas never called.The pstack suite passes except the symlink launcher test, which also fails on main on macOS.