Skip to content

fix(go): type checks as Check in unified bindings - #83

Merged
eunomie merged 1 commit into
mainfrom
type-checks-as-check-in-unified-bindings
Oct 23, 2026
Merged

eunomie merged 1 commit into
mainfrom
type-checks-as-check-in-unified-bindings

Conversation

@eunomie

@eunomie eunomie commented Oct 23, 2026

Copy link
Copy Markdown
Member

Supersedes #77 (moved from a fork branch to a branch on the canonical repo).

What

A unified client for a module pinned before v1 typed its checks as Void,
from the target's own view. The caller runs in a v1 session, where a
check returns Check!, so the engine rejected the call: field "test" of type "Check" must have a selection of subfields.

Unified generation now types every @check function as Check!; other
functions keep their type, and module bindings mark their own checks.
Callers use .Error(ctx), which also fixes the predicted typescript and
elixir ReleaseDryRun calls.

A unified client always runs in a v1 session, even in a module pinned
before v1: the dispatcher's session uses the engine's version, and
Go-runtime modules cannot use unified clients. Embedded clients keep the
target's types.

How verified

  • On v1.0.0-beta.18, a module calling github.com/dagger/pytest's test:
    before, the engine error; now .Error(ctx) returns nil or the failure.
  • Golden tests and a self-call test, each failing without the fix.

A unified client runs in a v1 session, where a check function returns
Check. The client schema follows the target's own view, so a check of a
module pinned before v1 was generated as Void, and the engine rejected
the query: "field of type Check must have a selection of subfields".
The self-call schema also dropped a module's own checks.

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie marked this pull request as ready for review October 23, 2026 14:56
@eunomie
eunomie merged commit c143202 into main Oct 23, 2026
9 checks passed
@eunomie
eunomie deleted the type-checks-as-check-in-unified-bindings branch October 23, 2026 15:01
sipsma added a commit to dagger/dagger that referenced this pull request Nov 5, 2026
go-sdk v1.4.0 types every dependency's check as a Check in unified
bindings (dagger/go-sdk#83), so the Python, TypeScript and Elixir dry
runs now return one, as the Rust dry run already did. One helper turns a
failed check into the error the release report records.

Signed-off-by: Erik Sipsma <[email protected]>
sipsma added a commit to dagger/dagger that referenced this pull request Nov 5, 2026
go-sdk v1.4.0 types every dependency's check as a Check in unified
bindings (dagger/go-sdk#83), so the Python, TypeScript and Elixir dry
runs now return one, as the Rust dry run already did. One helper turns a
failed check into the error the release report records.

Signed-off-by: Erik Sipsma <[email protected]>
sipsma added a commit to dagger/dagger that referenced this pull request Nov 5, 2026
go-sdk v1.4.0 types every dependency's check as a Check in unified
bindings (dagger/go-sdk#83), so the Python, TypeScript and Elixir dry
runs now return one, as the Rust dry run already did. One helper turns a
failed check into the error the release report records.

Signed-off-by: Erik Sipsma <[email protected]>
sipsma added a commit to dagger/dagger that referenced this pull request Nov 5, 2026
go-sdk v1.4.0 types every dependency's check as a Check in unified
bindings (dagger/go-sdk#83), so the Python, TypeScript and Elixir dry
runs now return one, as the Rust dry run already did. One helper turns a
failed check into the error the release report records.

Signed-off-by: Erik Sipsma <[email protected]>
sipsma added a commit to dagger/dagger that referenced this pull request Nov 5, 2026
go-sdk v1.4.0 types every dependency's check as a Check in unified
bindings (dagger/go-sdk#83), so the Python, TypeScript and Elixir dry
runs now return one, as the Rust dry run already did. One helper turns a
failed check into the error the release report records.

Signed-off-by: Erik Sipsma <[email protected]>
sipsma added a commit to dagger/dagger that referenced this pull request Nov 5, 2026
go-sdk v1.4.0 types every dependency's check as a Check in unified
bindings (dagger/go-sdk#83), so the Python, TypeScript and Elixir dry
runs now return one, as the Rust dry run already did. One helper turns a
failed check into the error the release report records.

Signed-off-by: Erik Sipsma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant