Drop the polyfill for native workspace APIs - #16
Draft
grouville wants to merge 1 commit into
Draft
Conversation
Same migration as go-sdk (dagger/dagger#13769): findConfigDirs, fork, moduleSource and generatedContextChangeset are engine APIs now, and the per-module generate no longer needs .changes on a polyfill fork — the engine returns the changeset directly, already measured from the caller's cwd past the engineVersion cutover. 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>
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).Same mechanical mapping as the go-sdk migration (
findConfigDirs,fork,withNewDirectorywith/-anchored paths,moduleSource(...).core→moduleSource(...), the polyfill'sgenerate→generatedContextChangeset). Two spots worth a closer look:generateAllModulefolds per-module changesets through the emptychangeset.withChangesets(...)builder — same shape as go-sdk — instead of onto a fork's empty changeset; the reason to avoidws.changes(nested per-dependency generation) is unchanged and still commented.core: outside-cwd removals in a generated context are artifacts, not errors) — the e2e generate checks exercise exactly the nested per-dependency flow.Verified locally against a dev engine built from the two engine PRs:
dagger check— 46/48. The two that don't pass:sdk-sdk:scaffolded-module-loads: the sdk-sdk contract checks install a release CLI inside their runner and therefore cannot load an SDK requiring the unreleased engine — the same red-until-release condition as CI itself.e-2-e:generate:generate-all-check: one real open edge in the nested per-dependency generation flow — the merged changeset is missing the dependent module'ssdk/index.ts. This suite already caught (and got fixed in workspace: fork + cwd-measured changesets (polyfill removal, part 2) dagger#13855) two engine-side interactions of the same flavor: outside-cwd removal artifacts of reduced generated contexts, and changeset merges dying when content removes.git. This last one looks like a sibling of those — the dependency's raw changeset carries reduced-context removal artifacts at the workspace root, and the octopus merge lets them swallow the dependent's additions. Tracked on stdlib: remove dependency on polyfill module dagger#13769; needs an engine-side look at how reduced generated contexts diff, rather than more SDK-side patching.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.