Skip to content

Drop the polyfill for native workspace APIs - #12

Draft
grouville wants to merge 1 commit into
dagger:mainfrom
grouville:polyfill-removal
Draft

Drop the polyfill for native workspace APIs#12
grouville wants to merge 1 commit into
dagger:mainfrom
grouville:polyfill-removal

Conversation

@grouville

Copy link
Copy Markdown
Member

Migrates this SDK off github.com/dagger/polyfill, onto the engine's own workspace APIs — part of dagger/dagger#13769 (tracking checklist there; engine PRs dagger/dagger#13854 and dagger/dagger#13855).

  • findConfigDirs becomes ws.findConfigDirs (in main.dang.tmpl, the template main.dang is generated from — the rendered file follows via dagger generate templates:generate).
  • module sources load through Workspace.moduleSource, with moduleName / introspectionSchemaJSON read off the native ModuleSource.
  • generateModule and initModule stop hand-building changesets from raw directory diffs: they stage through Workspace.fork, so the changeset comes back measured from the caller's cwd and a change outside the cwd is a loud error. The hand-built root-measured diffs used to land files in the wrong place when generating from a subdirectory.

Verified locally against a dev engine built from the two engine PRs: dagger check — every check that can run pre-release passes. Two groups cannot, both for the same reason CI itself stays red:

  • the e2e checks that load a "sdk": "java" fixture module: the engine resolves that SDK name to github.com/dagger/dagger/sdk/java@<engineVersion>, and the v1.0.0-beta.10 tag does not exist until the release is cut
  • the sdk-sdk:* contract checks, which install a release CLI inside their runner and therefore cannot load an SDK requiring the unreleased engine

CI stays red until the engine release that ships these APIs exists. The engineVersion bump assumes v1.0.0-beta.10 — adjust if the release numbers differently. The bump and the dependency removal must land together: the version gate is what scopes the engine's new changeset rooting to migrated modules.

The engine now covers everything this SDK used the polyfill for
(dagger/dagger#13769): findConfigDirs is Workspace.findConfigDirs,
and module sources load through Workspace.moduleSource with
moduleName / introspectionSchemaJSON read off the native ModuleSource.

generateModule also stops hand-building its changeset from raw
directory diffs: it stages through Workspace.fork, so the changeset
comes back measured from the caller's cwd and a change outside the
cwd is a loud error — hand-built root-measured diffs used to land in
the wrong place when generating from a subdirectory.

The engineVersion bump and the dependency removal land together: the
version gate scopes the engine's new changeset rooting to migrated
modules.

Signed-off-by: Guillaume de Rouville <guillaume@dagger.io>
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