Summary#
Your app is compiled by one platform: the release your osy is. minPlatform in app.osy says so, and three things
follow from it:
- a CLI older than it refuses the app (
osy validate,compile,launch,deploy), naming both versions; osy compileandosy deploysay so in one line when it is missing or older than your CLI's release — with the exact line to write — and build for your CLI's release either way;osy deployinto an environment whose release is older is refused before anything is built or uploaded, and the platform refuses it again if it gets that far.
app Gallery {
minPlatform "0.9.16";
model "model/**/*.osy";
}
entity Poster {
[Required, MaxLength(200)] string Title;
}Signature#
app <Name> {
minPlatform "<MAJOR.MINOR.PATCH>"; // a platform release, like "0.9.16"
…
}The value is a release number — three numbers, nothing else. It is written once; a second line is refused.
Description#
Who writes it#
osy init writes it as the first line of the new app's app { } block. After that it is yours: no verb that compiles
or checks the app edits app.osy.
| verb | an app with no minPlatform | an older one than your CLI | a newer one than your CLI |
|---|---|---|---|
osy init | writes your CLI's release | — | — |
osy compile, osy launch, osy deploy | notes the line to write | notes the line to write | refused |
osy validate, osy check | leaves it alone | notes the line to write | refused |
A compile never edits the source it compiles, so the note is the whole of it:
· app.osy says `minPlatform "0.9.4"`, and this CLI compiles against 0.9.16, so what it builds needs 0.9.16 — write
`minPlatform "0.9.16";` in its `app { }` block to say so.What you deploy is safe either way: osy deploy sends the release it built your app at — your CLI's — with the
deploy, so an app this CLI built is never built on an older release, whatever the file says. Raising the line keeps
the file honest: your app was compiled by your CLI's platform and by no older one, so a floor below that is a claim
nothing checked.
When your CLI is older than the app#
Someone wrote the app with a newer osy. What your CLI would say about it proves nothing about the platform it needs,
so it stops:
✗ Shelf needs platform 0.9.20 or newer (app.osy says `minPlatform "0.9.20"`), and this CLI compiles against
0.9.16 (0.9.16): update the CLI — `osy upgrade` — and run this again. Nothing was compiled.osy --version prints the release your CLI is.
When the environment runs an older release#
An environment runs your app on one platform release, and its zone builds every deploy on that release. osy deploy
asks where the app runs before it builds anything; when the environment's release is older than minPlatform:
✗ shelf needs platform 0.9.16 or newer (its app.osy says `minPlatform "0.9.16"`), and prod runs it on release 0.9.4
— nothing was built or sent. Move shelf in prod to release 0.9.16 or later from its Platform page, or wait for
0.9.16 to be GA.The deploy carries minPlatform to the platform, which refuses the same way before it records a version or starts a
build. That is also the only check for an environment's first deploy, whose release the platform chooses then:
the newest release your organization can run. If that is older, the refusal says to wait for the release to be GA.
An unreleased CLI#
A CLI built from source is not any release. It knows the newest release it contains: built exactly at that release it
counts as it, and built after it — the usual case — it counts as the next release, because it may compile
anything added since. osy --version shows which (unreleased, 3 commit(s) after 0.9.15), and an app it compiles
needs that next release (and osy init writes it). Such an app deploys once that release exists. A build that knows no
release at all checks and writes nothing.
Kits state theirs too#
A kit's package.osy carries the same minPlatform line, with the same meaning: a floor. The platform refuses a kit
on an older release, and takes it on any newer one — however much newer — where compiling it in your project is the
verdict on whether it still runs (package.osy). A kit's floor must cover what it uses: a kit naming a built-in icon or a baseline
enum member that arrived in a later release needs that release as its floor.
See also#
- app.osy — everything else
app.osysays - package.osy — a kit's
minPlatformand the releases it runs on - Hosting an Osy# app — environments, and the release each runs
- Deploying while workflows are running — the versions a deploy records