Keeps the third-party versions in the generated-project templates current.
The generators pin versions (Conan packages, crates, Maven artifacts, GitHub
Actions, the Go module of the Phony actor library) in
ActorSimulation.TemplateVersions. Left alone, those pins rot silently: a
generated project can be years behind the frameworks it claims to use.
This task asks each upstream for its latest release and reports the drift.
$ mix templates.upgrade --check
and, unless --check is given, rewrites the table:
$ mix templates.upgrade
Options
--check— report only; exits non-zero when any pin is behind--examples— after upgrading, regenerate the checked-inexamples/andgenerated/projects by running thescripts/generate_*.exsscripts--offline— skip upstream lookups and only report the table
Versions that have no meaningful upstream (a language level, a minimum CMake,
a floating ponyup channel) are marked :manual in
ActorSimulation.TemplateVersions.sources/0, and are reported but never
rewritten.
GitHub rate limits
Anonymous GitHub API requests are limited to 60 per hour, and this task makes
about a dozen of them. Export GH_TOKEN (or GITHUB_TOKEN) to raise the
limit:
$ GH_TOKEN=$(gh auth token) mix templates.upgrade --check
Example output
Template versions (lib/actor_simulation/template_versions.ex)
key current latest upstream
──────────────────────────────────────────────────────────────────────
caf 1.1.0 1.1.0 conan center: caf
cmake_minimum 3.15 — manual: minimum CMake the templates require
omnetpp 6.4.0 — github release: omnetpp/omnetpp — could not read …
Summary
Functions
Runs the task against fetch, the table kept in path, and run_script for
regenerating the checked-in examples.
Functions
Runs the task against fetch, the table kept in path, and run_script for
regenerating the checked-in examples.
Mix calls run/1; this arity exists so the task can be exercised without the
network, without rewriting the real table, and without rebuilding examples.