Drop the polyfill for native workspace APIs - #14
Open
grouville wants to merge 1 commit into
Open
Conversation
grouville
force-pushed
the
polyfill-removal
branch
from
August 11, 2026 23:44
59a8c4c to
8ff7390
Compare
TomChv
reviewed
Aug 12, 2026
| pub sdkTarget(ws: Workspace!): SdkTarget! { | ||
| let module = sdkModule(ws) | ||
| target(module.workspaceView, module.sourceRootPath) | ||
| target(module.contextDirectory, module.sourceRootSubpath) |
Member
There was a problem hiding this comment.
I don't understand that change, it was already using the native API, why this part changes?
Member
Author
There was a problem hiding this comment.
Yeah, it's surprising 😇
The polyfill usage is hidden in this line: let sdkModule(ws: Workspace!): PolyfillModuleSource!
So workspaceView and sourceRootPath were fields from the polyfill wrapper PolyfillModuleSource.
Now sdkModule returns a native ModuleSource, whose equivalents are contextDirectory and sourceRootSubpath.
No behavior change was intended, just converting the types
| view.withFile("dagger.json", view.file(module.sourceRootSubpath + "/dagger.json")) | ||
| } else { | ||
| view.withFile("dagger-module.toml", view.file(module.sourceRootPath + "/dagger-module.toml")) | ||
| view.withFile("dagger-module.toml", view.file(module.sourceRootSubpath + "/dagger-module.toml")) |
Member
There was a problem hiding this comment.
Same here, we're not using the polyfill module is this function so why does it changes? is there a bug in the sdk-sdk module?
Signed-off-by: Guillaume de Rouville <guillaume@dagger.io>
grouville
force-pushed
the
polyfill-removal
branch
from
August 13, 2026 02:31
8ff7390 to
411cdf9
Compare
TomChv
marked this pull request as ready for review
August 13, 2026 13:10
TomChv
approved these changes
Aug 13, 2026
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.
sdk-sdk used
dagger/polyfillindirectly through the module-source type returned by its harness.The harness now returns the native
ModuleSource, so aliases such asworkspaceViewandsourceRootPathbecome their native equivalents,contextDirectoryandsourceRootSubpath. The contract tests otherwise keep the same behavior and now exercise the path every migrated SDK uses.Test
dagger check