Repository navigation
v1.5.0
Stewart 1.5 catches mistakes before they reach your server: a typo in an option, a missing setting or a broken app
now fails on your machine, in CI or at the deploy, not in the running daemon.
Highlights
make check builds every app. It wires each app the way its worker does, without running your code, and names
every app that would not start: an unknown or missing option, a constructor argument nothing provides, a Store
without persistence.url, an Mqtt without mqtt.url, or a #[PeerStore] with a typo.
App "battery-alert" sets option "treshold", which matches no parameter of App\BatteryAlert::__construct(). Did you mean "threshold"?
App "keeper" cannot be built: Persistence is not configured; set persistence.url in stewart.yaml or STEWART_PERSISTENCE__URL in .env.
The Git deploy mode runs the same check on every push, so such a commit no longer goes out with one app failing.
CI guards the image. New projects' CI also runs make check, and the Image workflow builds only after CI
passes, so a commit that fails never becomes an image a server can pull.
make deploy stays up. It installs changed dependencies and runs stewart check in one-off containers first,
and only then restarts Stewart. A failed check stops the deploy and leaves the running daemon alone.
No more empty dispose(). App now asks only for initialize(). An app that has something to close implements
the new Disposable interface; every other app can delete its empty dispose().
Shorter tests for exposed entities. requireSwitch('heater')->pushTurnOn(), pushPress(), pushOption('eco')
and pushValue(3) replace building a command by hand.
Also new
- Apps without
worker:are placed by a hash of their ID, so adding an app no longer moves the others between
workers. After the upgrade, apps can move once. make checkmentions classes inapps/that implementAppbut lack#[Automation].
Upgrading
Run make upgrade VERSION=1.5, then make check, and delete the empty dispose() methods it lists. An app that
marks dispose() with #[\Override] must implement Disposable before it loads again. The new make deploy and CI
steps come from the skeleton when you want them. The
upgrading guide has the details.
Every change is in the changelog.