Simple dependency manager for TLA+.
This CLI is a wrapper over TLC which can fetch modules from Maven or Clojars. This has the following advantages:
-
Not bloating the TLA+ Community Modules repo;
-
No need for custom repository, just use the ones you are used to, e.g. maven or clojars;
-
Ease sharing(Perhaps? Let’s see if someone will use it).
Install Babashka (https://github.com/babashka/babashka#quickstart).
Then install tladeps
.
bash < <(curl -s https://raw.githubusercontent.com/pfeodrippe/tladeps/master/install)
The arguments are the same that you use for TLC or Sany (or any other tlatool class), but you can also pass:
-
--tladeps-dep
, you can pass shortcuts for existent and registered deps (see thesrc/tladeps/core.clj
file); -
--tladeps-raw-deps
, pass a EDN map with references to any other dependencies (see below), it’s a scape hatch if the dependency/module is not already registered here. -
--tladeps-classpath
, returns only the classpath. You have to add edn namespaces manually if needed, but this may be more composable if you want to keep usingjava -cp …
command to call tla tools.
See examples below.
Let’s say I have a Abc.tla
file.
------------- CONFIG Abc --------- =================== -------------------------------- MODULE Abc -------------------------------- EXTENDS Edn, Integers, Sequences, TLC, TLCExt ASSUME(ToEdn({}) = "#{}") =============================================================================
We can use the registed EDN module with --tladeps-dep edn
.
tladeps --tladeps-dep edn tlc2.TLC Abc.tla -config Abc.tla