ZX: Define a Dependency

If your project depends on other packages you will need to declare them. ZX does not silently update dependencies, so all dependency declarations are explicit and exist in a flat, static list.

Extended dependency graphs do not exist in ZX projects. Instead, each version of an application specifies all of its dependencies, while libraries list dependencies only to help application authors create their application's dependency list (and issue a warning if something is missing) and to make tests executable. The code loading environment is constructed uniquely for each application launch, so as long as your dependency declarations work together there is no risk of system-wide library conflicts.

Dependencies are researchable using the "check deps [package_id]" command. To change dependency versions you are required to update the dependency declaration list and release a new patch version of your package. Static dependencies are a burden on the packager (who is often also the developer), but provide a very strong reproducability guaratee to end-users, system administrators and downstream developers.

Declare dependencies with the "set dep" command. Unlike most other commands, "set dep" requires a complete version number. You can see a list of available package versions using the "list versions" command. (Note that "list versions" accepts partial version numbers.)

ceverett@takoyaki:~/code/my_app$ zx list versions otpr-jumptext
0.3.1
0.4.0
1.0.0
1.0.1
ceverett@takoyaki:~/code/my_app$ zx set dep otpr-jumptext-1.0.1

Updating dependencies is the same as setting one to begin with, run the "set dep" command again with an updated version number.