Drop the polyfill for native workspace APIs - #30
Draft
grouville wants to merge 1 commit into
Draft
Conversation
The engine now covers everything this SDK used the polyfill for (dagger/dagger#13769): - findConfigDirs is Workspace.findConfigDirs, same semantics - fork is Workspace.fork: changes() on a fork returns only the fork's own edits, measured from the caller's cwd — the isolation and rooting the polyfill's fork provided. Staging paths anchor at "/" because the native fork resolves relative paths from the cwd, where the polyfill's took workspace-root paths. - moduleSource(...).core is just Workspace.moduleSource(...) - the polyfill's generate is ModuleSource.generatedContextChangeset: past the engineVersion cutover the engine hands it back already measured from the caller's cwd, so nothing needs re-rooting here The engineVersion bump to the release that ships those APIs and the dependency removal land together: the version gate is what scopes the engine's new changeset rooting to migrated modules. Signed-off-by: Guillaume de Rouville <guillaume@dagger.io>
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.
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.workspace(ws).findConfigDirs(...)ws.findConfigDirs(...)polyfill.workspace(ws).forkws.forkfork.withDirectory(path, dir).withNewDirectory("/" + path, dir)— the native staging API resolves relative paths from the cwd, so workspace-root paths anchor at/…moduleSource(p).corews.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 writeVerified locally against a dev engine built from the two engine PRs:
dagger check— 42/42 passed, including the full e2e suite (generate, clients, cwd scoping) and the sdk-sdk contract checks.CI stays red until the engine release that ships these APIs exists. The
engineVersionbump assumesv1.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.