From da2ed282fd1cffda8a5ef7242b2aa562182b5e4f Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Wed, 24 Jun 2026 11:40:50 -0700 Subject: [PATCH] Resolve SDK-managed module paths from workspace root SDK-managed module entries store their module path relative to the workspace root. The helper APIs were passing that path directly to moduleSource, where a relative path is interpreted from the current working directory. That breaks generate flows from nested workspace directories such as .dagger or .dagger/modules: .dagger/modules/myapp is resolved as .dagger/.dagger/modules/myapp, and generate fails while computing changeset paths. Prefix SDK-managed paths with / before calling the sdk-sdk polyfill. The polyfill already treats /path as a workspace-root-relative module source, which matches the meaning of Mod.path. This updates generateAll and direct mod generate. Signed-off-by: Guillaume de Rouville --- mod.dang | 2 +- python-sdk.dang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod.dang b/mod.dang index 3df12f9..6d64737 100644 --- a/mod.dang +++ b/mod.dang @@ -39,7 +39,7 @@ type Mod { if (skipGenerate) { polyfill.workspace(ws).fork.changes } else { - polyfill.workspace(ws).moduleSource(path).generate.changes + polyfill.workspace(ws).moduleSource("/" + path).generate.changes } } } diff --git a/python-sdk.dang b/python-sdk.dang index f5dc7a5..50fc27a 100644 --- a/python-sdk.dang +++ b/python-sdk.dang @@ -216,7 +216,7 @@ type PythonSdk { .map { m => Mod(path: m.path, ws: ws, skipGenerateFilename: skipGenerateFilename) } .filter { mod => mod.skipGenerate == false } .reduce(pws.fork) { fork, mod => - fork.merge(pws.moduleSource(mod.path).generate) + fork.merge(pws.moduleSource("/" + mod.path).generate) } .changes }