From 66c7bd0248862cabc136ccc8352bd1d145a38b03 Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Tue, 25 Aug 2026 17:03:12 +0200 Subject: [PATCH 1/3] Point the proxy dependency at the published module The dependency named a local ./proxy directory that does not exist in this repository, so the module could not be loaded at all: the proxy module lives in github.com/dagger/proxy and the workspace config already installs it from there. Name the same published source in the module config and pin it, so a fresh clone resolves. Signed-off-by: Guillaume de Rouville Signed-off-by: Yves Brissaud --- dagger.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dagger.json b/dagger.json index 57524f1..9ba7da7 100644 --- a/dagger.json +++ b/dagger.json @@ -12,7 +12,8 @@ }, { "name": "proxy", - "source": "./proxy" + "source": "https://github.com/dagger/proxy@main", + "pin": "3224e8981d8c8f04a0c238dc933b7415a2a6349f" } ] -} \ No newline at end of file +} From 0632abc1aa7fbfdae0c788f5e3ea3f11c9027c37 Mon Sep 17 00:00:00 2001 From: Yves Brissaud Date: Tue, 25 Aug 2026 17:13:44 +0200 Subject: [PATCH 2/3] Drop the unused Compose path helpers Compose.depth and Compose.relativeToCwd have no call sites: the Compose type never calls findUp, so it never has a workspace-root-absolute path to convert. Docker.relativeToCwd, which Docker.project does use, stays. Removing them here keeps the following engine bump from having to port dead code onto the v1 spelling of Workspace.cwd. Signed-off-by: Yves Brissaud --- compose.dang | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/compose.dang b/compose.dang index 3c008ee..9ac81fa 100644 --- a/compose.dang +++ b/compose.dang @@ -35,32 +35,6 @@ type Compose { } } - - """ - Return the number of path segments of a workspace-root-absolute file path. - """ - let depth(filePath: String!): Int! { - filePath.trimPrefix("/").split("/").length - } - - """ - Return the directory of a workspace-root-absolute file path, relative to the - client's cwd: "/a/b/compose.yaml" from cwd "a" is "b", from "a/b/c" is "..". - """ - let relativeToCwd(ws: Workspace!, filePath: String!): String! { - let dirSegments = filePath.trimPrefix("/").split("/").dropLast(1) - let cwdSegments = ws.path.trimPrefix("/").split("/").filter { segment => - segment != "" and segment != "." - } - # Longest common prefix: acc only advances while every prior segment matched. - let common = cwdSegments.map { segment, i => i }.reduce(0) { acc, i => - if (acc == i and dirSegments[i] == cwdSegments[i]) { acc + 1 } else { acc } - } - let segments = cwdSegments.dropFirst(common).map { segment => ".." } + - dirSegments.dropFirst(common) - if (segments.length == 0) { "." } else { segments.join("/") } - } - """ Run the services of the Compose project detected from the client's cwd, proxied through a single service with one frontend port per compose service. From 6c4c5b966da95a5d38f459424c8154af315201de Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Tue, 25 Aug 2026 17:14:01 +0200 Subject: [PATCH 3/3] Drop the polyfill for the engine's findRoots The engine now ships Workspace.findRoots (dagger/dagger#13854): the same cwd-aware project discovery this module got from github.com/dagger/polyfill. Its contract matches the polyfill's findConfigDirs one for one -- the nearest enclosing project first when the cwd holds no config of its own, then every project at or below the cwd, all as cwd-relative paths -- so the call site swaps directly and no path resolution is needed: this module speaks cwd-relative paths throughout, and findRoots results are usable as-is with the other workspace APIs. This module was still pinned to v0.20.6 and read the cwd through the legacy Workspace.path field, which the v1 view removed. So the version bump also moves Docker.relativeToCwd onto Workspace.cwd, which spells the same location with a leading "/" -- the helper already strips it before comparing segments, so the conversion is unchanged. The engineVersion bump and the dependency removal have to land together: findRoots only exists on the v1 view of Workspace. Signed-off-by: Guillaume de Rouville Signed-off-by: Yves Brissaud --- compose.dang | 5 ++--- dagger.json | 7 +------ docker.dang | 7 +++---- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/compose.dang b/compose.dang index 9ac81fa..aaa22f6 100644 --- a/compose.dang +++ b/compose.dang @@ -27,9 +27,8 @@ type Compose { prefix marks an enclosing project. """ pub projects(ws: Workspace!): [ComposeProject!]! { - polyfill - .workspace(ws) - .findConfigDirs(configNames) + ws + .findRoots(markers: configNames) .map { projectPath => ComposeProject(path: projectPath, composeImage: composeImage, configNames: configNames) } diff --git a/dagger.json b/dagger.json index 9ba7da7..af53617 100644 --- a/dagger.json +++ b/dagger.json @@ -1,15 +1,10 @@ { "name": "docker", - "engineVersion": "v0.20.6", + "engineVersion": "v1.0.0-beta.10", "sdk": { "source": "dang" }, "dependencies": [ - { - "name": "polyfill", - "source": "github.com/dagger/polyfill@main", - "pin": "ec3ea84a2351b4beb06ecece951f2e5ef66509ff" - }, { "name": "proxy", "source": "https://github.com/dagger/proxy@main", diff --git a/docker.dang b/docker.dang index 8af9f78..21b90b2 100644 --- a/docker.dang +++ b/docker.dang @@ -17,9 +17,8 @@ type Docker { marks an enclosing project. """ pub projects(ws: Workspace!): [DockerProject!]! { - polyfill - .workspace(ws) - .findConfigDirs(["Dockerfile"]) + ws + .findRoots(markers: ["Dockerfile"]) .map { projectPath => DockerProject(path: projectPath, lintImage: lintImage) } @@ -53,7 +52,7 @@ type Docker { """ let relativeToCwd(ws: Workspace!, filePath: String!): String! { let dirSegments = filePath.trimPrefix("/").split("/").dropLast(1) - let cwdSegments = ws.path.trimPrefix("/").split("/").filter { segment => + let cwdSegments = ws.cwd.trimPrefix("/").split("/").filter { segment => segment != "" and segment != "." } # Longest common prefix: acc only advances while every prior segment matched.