Skip to content

Drop the polyfill for the engine's findRoots - #2

Merged
TomChv merged 3 commits into
dagger:mainfrom
grouville:polyfill-removal
Aug 26, 2026
Merged

TomChv merged 3 commits into
dagger:mainfrom
grouville:polyfill-removal

Conversation

@grouville

@grouville grouville commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

The MochaJS module uses dagger/polyfill to find projects from several supported config filenames. It should include projects below the user's current directory, select the nearest enclosing project from a subdirectory, and leave siblings outside that scope alone.

Workspace.findRoots in dagger/dagger#13854 now owns that behavior, so this PR removes the wrapper. The API landed as findRoots rather than the provisional findConfigDirs, and markers is a named argument because the first positional is start. engineVersion moves to v1.0.0-beta.10 for both the module and the e2e module — the first release that ships it.

The node_modules exclusion is this module's own policy rather than the engine's, and it now rides on the engine's glob semantics instead of the polyfill's, so vendoredDiscoveryCheck pins it.

dagger.lock migrates to the v2 format. Beta.10 rewrites the file on every run, so keeping the v1 file would hand every contributor a dirty worktree.

Test

dagger --x-release=v1.0.0-beta.10 check

All 10 checks pass, covering config names, ancestor and descendant selection, sibling exclusion, vendored-tree pruning, project listing, and the sample projects. vendoredDiscoveryCheck was checked against its negative: dropping the exclude argument makes it fail with got [., node_modules/dep], want [.].

The engine now ships Workspace.findConfigDirs (dagger/dagger#13769):
the same cwd-aware project discovery this module got from
github.com/dagger/polyfill — same semantics, ported from the
polyfill's own design and test matrix. Swap the call, drop the
dependency, and require the engine release that ships it.

The engineVersion bump and the dependency removal have to land
together: the version gate is what keeps the engine's new changeset
behavior scoped to migrated modules.

Signed-off-by: Guillaume de Rouville <[email protected]>
The API landed as Workspace.findRoots, not findConfigDirs, with markers
as a named argument: the first positional is start. v1.0.0-beta.10 is
the first release that ships it, so pin the e2e module to it too.

The node_modules exclusion is this module's own policy rather than the
engine's, and it now rides on the engine's glob semantics instead of the
polyfill's, so vendoredDiscoveryCheck pins it.

Signed-off-by: Tom Chauveau <[email protected]>
@TomChv
TomChv marked this pull request as ready for review August 26, 2026 11:22
v1.0.0-beta.10 rewrites dagger.lock on every run, so leaving the v1 file
in the tree hands every contributor a dirty worktree. Record the
migrated file instead: the v2 format, the re-resolved dang-sdk ref, and
the base image digests for both platforms the module is built on.

Signed-off-by: Tom Chauveau <[email protected]>
@TomChv TomChv changed the title Drop the polyfill for the engine's findConfigDirs Drop the polyfill for the engine's findRoots Aug 26, 2026
@TomChv

TomChv commented Aug 26, 2026

Copy link
Copy Markdown
Member

Tests passes locally but they don't run in CI, I think there might be an infra issue: https://dagger.cloud/Quartz/traces/23ccf10d6bac072c67cbd2f4a1a85fc9#2b90bea06a910e6b

@TomChv
TomChv self-requested a review August 26, 2026 13:19
@TomChv
TomChv merged commit c548630 into dagger:main Aug 26, 2026
11 checks passed
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.

2 participants