From 88b639196eb41d3fcabdb1821331631cace85978 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Dec 2025 07:11:28 +0000 Subject: [PATCH 1/2] Initial plan From f34b166580462c19137410e46871bb423d419af0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Dec 2025 07:18:09 +0000 Subject: [PATCH 2/2] Fix Windows directory creation error in runner.js by using analyzePath Co-authored-by: TomeHirata <33407409+TomeHirata@users.noreply.github.com> --- dspy/primitives/runner.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dspy/primitives/runner.js b/dspy/primitives/runner.js index d74653fcff..5808512d9e 100644 --- a/dspy/primitives/runner.js +++ b/dspy/primitives/runner.js @@ -42,11 +42,12 @@ for await (const line of readLines(Deno.stdin)) { for (const d of dirs) { cur += '/' + d; try { - pyodide.FS.mkdir(cur); - } catch (e) { - if (!(e && e.message && e.message.includes('File exists'))) { - console.log("[DEBUG] Error creating directory in Pyodide file system:", cur, "|", e.message); + const pathInfo = pyodide.FS.analyzePath(cur); + if (!pathInfo.exists) { + pyodide.FS.mkdir(cur); } + } catch (e) { + console.log("[DEBUG] Error creating directory in Pyodide file system:", cur, "|", e.message); } } pyodide.FS.writeFile(virtualPath, contents);