Repository navigation
Keep the prerelease of the declared Dagger version - #208
Merged
Merged
Conversation
Dagger now gives its v1.0.0 prereleases their own API views: from v1.0.0-beta.21 on, a view keeps the declared prerelease, and the earlier prereleases share the v1.0.0-beta.20 view (engine.APIViewVersion). Dropping the prerelease, as `dagger = "v1.0.0-beta.21"` did, sent `--version v1.0.0` and so selected the newest v1.0.0 view instead of the declared one. Version gains a Prerelease, which parseVersion keeps and Before orders by semver precedence (beta.9 before beta.10, a prerelease before its release). DaggerVersionString writes it, so it reaches `dagger session --version` and ModuleSource.withEngineVersion as declared; "0.19" is still v0.19.0. Build metadata is still dropped: it has no precedence, and Dagger ignores it for views. A Dang version drops the prerelease as it drops the patch. The engine check now compares prereleases too: a v1.0.0-beta.20 engine is older than a declared v1.0.0-beta.21, and a v1.0.0-rc.1 engine older than v1.0.0. A dev build counts as its release, as the engine treats it: one whose prerelease mentions "dev" (v1.0.0-dev-123, or the older v0.19.3-250101120000-dev-<commit>) satisfies every prerelease of its base. Current dev builds report their VERSION file plus the commit as build metadata (v1.0.0-beta.21+42424242), which compares as that prerelease. __schemaVersion no longer has to equal the declared version, since a v1.0.0-beta.19 is served the v1.0.0-beta.20 view, and engines before beta.21 serve every v1.0.0 prerelease the v1.0.0 view. It must be a view of the same release that is not older than the declared version; a view of another release still means the session ignored the version. Signed-off-by: Alex Suraci <[email protected]>
Say that a prerelease such as v1.0.0-beta.21 reaches Dagger as is and gets that prerelease's API, that build metadata is dropped, and that an older prerelease engine is too old. Signed-off-by: Alex Suraci <[email protected]>
DaggerSource's MarshalTOML and MarshalJSON docs still said "vX.Y.Z". Signed-off-by: Alex Suraci <[email protected]>
Deploying dang with
|
| Latest commit: |
e780fdd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1127be8c.dang-3kk.pages.dev |
| Branch Preview URL: | https://dagger-version-prerelease.dang-3kk.pages.dev |
This was referenced Oct 28, 2026
vito
added a commit
to dagger/dagger
that referenced
this pull request
Oct 28, 2026
Pins github.com/vito/dang/v2 to the head of vito/dang#208, stacked on #206 and #185. Together they add the `dang` and `[imports.Dagger] dagger` keys of dang.toml, dang.ContextWithVersion and DaggerSource.VersionString, which keeps a declared prerelease (v1.0.0-beta.19 stays as is rather than becoming v1.0.0, past the naming cut). BurntSushi/toml becomes a direct dependency: the engine decodes an entrypoint's dang.toml into Dang's own ProjectConfig. This is a pseudo-version of an unmerged branch; re-bump it to a Dang release before merging. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to dagger/dagger
that referenced
this pull request
Oct 28, 2026
Pins github.com/vito/dang/v2 to the head of vito/dang#208, stacked on #206 and #185. Together they add the `dang` and `[imports.Dagger] dagger` keys of dang.toml, dang.ContextWithVersion and DaggerSource.VersionString, which keeps a declared prerelease (v1.0.0-beta.19 stays as is rather than becoming v1.0.0, past the naming cut). BurntSushi/toml becomes a direct dependency: the engine decodes an entrypoint's dang.toml into Dang's own ProjectConfig. This is a pseudo-version of an unmerged branch; re-bump it to a Dang release before merging. Signed-off-by: Alex Suraci <[email protected]>
An engine is now older than the declared version only when its base version is (v1.0.0 for v1.0.1), as in Dagger's CheckMaxVersionCompatibility. A later prerelease of the engine's own release, or the release itself, is no longer refused: Dagger serves it the engine's own view (ModuleAPIViewVersion caps it), so `dagger = "v1.0.0"` works on beta and rc engines. The __schemaVersion check accepts such a capped view: one older than the declared version passes if it isn't older than the engine's own view. A view of another release still fails. Signed-off-by: Alex Suraci <[email protected]>
A later prerelease of the engine's release, or the release itself, gets the engine's newest API instead of an error. Signed-off-by: Alex Suraci <[email protected]>
The checkDaggerVersion comment and the skill's dang.toml reference still said any older engine is refused. Also note why the capped view is accepted for top-level sessions too: Dagger caps only module clients, but a top-level session that ignored the version on a same-version CLI serves the API a cap would. Signed-off-by: Alex Suraci <[email protected]>
An engine before v1.0.0-beta.22 has no prerelease views: it serves every v1.0.0 prerelease the v1.0.0 view, never the shared beta.21 one. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
dagger-version-prerelease
branch
from
October 28, 2026 20:05
05cba40 to
e780fdd
Compare
vito
marked this pull request as ready for review
October 28, 2026 20:06
vito
added a commit
to dagger/dagger
that referenced
this pull request
Oct 29, 2026
Pins github.com/vito/dang/v2 to the head of vito/dang#208, stacked on #206 and #185. Together they add the `dang` and `[imports.Dagger] dagger` keys of dang.toml, dang.ContextWithVersion and DaggerSource.VersionString, which keeps a declared prerelease (v1.0.0-beta.19 stays as is rather than becoming v1.0.0, past the naming cut). BurntSushi/toml becomes a direct dependency: the engine decodes an entrypoint's dang.toml into Dang's own ProjectConfig. This is a pseudo-version of an unmerged branch; re-bump it to a Dang release before merging. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to dagger/dagger
that referenced
this pull request
Oct 29, 2026
Pins github.com/vito/dang/v2 to the head of vito/dang#208, stacked on #206 and #185. Together they add the `dang` and `[imports.Dagger] dagger` keys of dang.toml, dang.ContextWithVersion and DaggerSource.VersionString, which keeps a declared prerelease (v1.0.0-beta.19 stays as is rather than becoming v1.0.0, past the naming cut). BurntSushi/toml becomes a direct dependency: the engine decodes an entrypoint's dang.toml into Dang's own ProjectConfig. This is a pseudo-version of an unmerged branch; re-bump it to a Dang release before merging. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to dagger/dagger
that referenced
this pull request
Oct 29, 2026
Pins github.com/vito/dang/v2 to the head of vito/dang#208, stacked on #206 and #185. Together they add the `dang` and `[imports.Dagger] dagger` keys of dang.toml, dang.ContextWithVersion and DaggerSource.VersionString, which keeps a declared prerelease (v1.0.0-beta.19 stays as is rather than becoming v1.0.0, past the naming cut). BurntSushi/toml becomes a direct dependency: the engine decodes an entrypoint's dang.toml into Dang's own ProjectConfig. This is a pseudo-version of an unmerged branch; re-bump it to a Dang release before merging. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to dagger/dagger
that referenced
this pull request
Oct 29, 2026
Pins github.com/vito/dang/v2 to the head of vito/dang#208, stacked on #206 and #185. Together they add the `dang` and `[imports.Dagger] dagger` keys of dang.toml, dang.ContextWithVersion and DaggerSource.VersionString, which keeps a declared prerelease (v1.0.0-beta.19 stays as is rather than becoming v1.0.0, past the naming cut). BurntSushi/toml becomes a direct dependency: the engine decodes an entrypoint's dang.toml into Dang's own ProjectConfig. This is a pseudo-version of an unmerged branch; re-bump it to a Dang release before merging. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to dagger/dagger
that referenced
this pull request
Nov 2, 2026
Pins github.com/vito/dang/v2 to the head of vito/dang#208, stacked on #206 and #185. Together they add the `dang` and `[imports.Dagger] dagger` keys of dang.toml, dang.ContextWithVersion and DaggerSource.VersionString, which keeps a declared prerelease (v1.0.0-beta.19 stays as is rather than becoming v1.0.0, past the naming cut). BurntSushi/toml becomes a direct dependency: the engine decodes an entrypoint's dang.toml into Dang's own ProjectConfig. This is a pseudo-version of an unmerged branch; re-bump it to a Dang release before merging. Signed-off-by: Alex Suraci <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #206.
dagger = "v1.0.0-beta.21"now reaches Dagger asv1.0.0-beta.21instead ofv1.0.0.Why
Dagger is making API views prerelease-granular for the v1.0.0 betas, so naming/API changes can be gated on the declared version with a cut at v1.0.0-beta.22 (dagger#14810,
engine.APIViewVersion; the cut moved from beta.21 after beta.21 shipped without it):v1.0.0-0…v1.0.0-beta.21→ one shared view,v1.0.0-beta.21(what they all had before);v1.0.0-beta.22and later → their own version;dev(e.g.v1.0.0-dev-<commit>) → the release,v1.0.0;v1.0.0→v1.0.0; build metadata dropped; below v1 unchanged (the base release).#206 dropped the prerelease ("What reaches Dagger: always vX.Y.Z"), so a module declaring
v1.0.0-beta.19would startdagger session --version v1.0.0and be served the newest v1.0.0 view, past the cut.Changes
VersiongainsPrerelease(e.g."beta.21").parseVersionkeeps it; build metadata is still dropped (no semver precedence, and Dagger ignores it for views)."0.19"still becomesv0.19.0,"1.0-beta.21"becomesv1.0.0-beta.21,"0.0.0-beta.1"is refused like"0.0".ParseVersiondrops the prerelease as it drops the patch ("2.1.0-rc.1"is 2.1).DaggerVersionString/DaggerSource.VersionStringwritevX.Y.Z[-prerelease], which is whatdagger session --version,ModuleSource.withEngineVersionand the TOML/JSON encodings get.Version.Beforeuses semver precedence (beta.9<beta.10<rc.1< release). Dang versions never have a prerelease, so their gates are unaffected.daggerEngineOlder): compares base versions (major.minor.patch; prerelease and build ignored), matching Dagger'sCheckMaxVersionCompatibility: only a declared version of a later release is refused (v1.0.1on av1.0.0engine,v0.20.0onv0.19.3). A later prerelease of the engine's own release, or the release itself (beta.21on abeta.20engine,v1.0.0onv1.0.0-rc.1orv1.0.0-beta.22), passes: Dagger caps it at the engine's own view (ModuleAPIViewVersion, dagger#14810), the newest API the engine has, rather than refusing it. Dev builds count as their release, whether they report a prerelease mentioningdev(v1.0.0-dev-123,v0.19.3-250101120000-dev-<commit>) or theirVERSIONfile plus build metadata (v1.0.0-beta.21+42424242.dirty).develand other unparseable versions are still not compared.--versionstill sends the full prerelease.__schemaVersioncheck (daggerServesVersion): no longer requires equality with the declared version, since a declaredbeta.19is legitimately servedv1.0.0-beta.21(the shared view) and engines without prerelease views (beta.21 and older) echov1.0.0for every v1.0.0 prerelease. It requires a view of the same release that is not older than the declared version, or, for a capped session, not older than the engine's own view (the engine's version; a dev build's is its release): av1.0.0-beta.22engine may serve a declaredv1.0.0orv1.0.0-rc.1atv1.0.0-beta.22, or echo it. With an unparseable engine version a cap can't be ruled out, so any same-release view passes. A view of another release (e.g.v0.21.6for a declaredv0.19.0) still fails as "the session ignored the version", as does a view older than both the declared version and the engine's.Open questions
__schemaVersioncheck is lenient within a release: keep it. A session that ignored--versionand serves its CLI's own newer prerelease view (declaredbeta.21, servedbeta.25) passes. Catching it would mean mirroring the engine's view mapping in Dang, keyed on the engine's version, and Dagger's cut points move (the cut already slipped from beta.21 to beta.22), so a mirror would go stale. The engine-older check still holds.v1.0.0on beta engines), so the engine-older check now compares base versions like Dagger does: a declared later prerelease or release of the engine's own version (dagger = "v1.0.0"on av1.0.0-rc.1orv1.0.0-beta.22engine) passes and is served the engine's view, as under Declare the Dagger version in the dagger import #206. Only a later release (v1.0.1onv1.0.0) fails. Dagger caps only clients in a module; a top-leveldagger session --version v1.0.0echoesv1.0.0and gets the same newest API. The__schemaVersioncheck accepts both.Tests
go test ./pkg/... ./cmd/...passes. New and updated cases:TestDaggerSource: prerelease kept, build dropped,1.0-beta.21,0.0.0-beta.1refused, JSON/TOML round trip of a prerelease;TestDaggerVersionImport:--version v1.0.0-beta.21from"v1.0.0-beta.21+abcdef12";TestCheckDaggerVersion: prerelease engines older and newer (a later prerelease or the release on a same-release prerelease engine passes; a later patch, minor or release's prerelease fails), dev engines (new- and old-style), the shared beta.21 view, release-granularv1.0.0views, capped views (v1.0.0andv1.0.0-rc.1servedv1.0.0-beta.22by a beta.22 engine, echoedv1.0.0, an unparseable engine), and views older than both the declared version and the engine's, or of another release;TestDaggerModuleSchemaVersion:withEngineVersion("v1.0.0-beta.21");TestVersionPrereleaseOrder: semver precedence, including numeric identifiers.