Skip to content

Drop the polyfill for native workspace APIs - #14

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

Drop the polyfill for native workspace APIs#14
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).

The mapping, mechanical throughout:

polyfill engine
polyfill.workspace(ws).findConfigDirs(...) ws.findConfigDirs(...)
polyfill.workspace(ws).fork ws.fork
fork.withDirectory(path, dir) .withNewDirectory("/" + path, dir) — the native staging API resolves relative paths from the cwd, so workspace-root paths anchor at /
…moduleSource(p).core ws.moduleSource(p)
.core.generateLocalDependencies(ws) .generateLocalDependencies(ws)
…moduleSource(p).generate .generatedContextChangeset — past the engineVersion cutover the engine hands it back already measured from the caller's cwd, so the polyfill's re-rooting has no replacement to write

Verified locally against a dev engine built from the two engine PRs: dagger check30/30 passed, including the full e2e suite; generateAll folds per-module changesets with changeset.withChangesets instead of merging polyfill forks — same result, computed per module against its staged workspace.

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.

Same migration as go-sdk (dagger/dagger#13769): findConfigDirs, fork,
moduleSource and generatedContextChangeset are engine APIs now.
generateAll folds per-module changesets with changeset.withChangesets
instead of merging polyfill forks — same result, the engine computes
each module's changes against its staged workspace.

Staging paths anchor at "/" because the native fork resolves relative
paths from the cwd, where the polyfill's took workspace-root paths.
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