From 6e4fdf95d06fc88fe796b474d3d0a0c7822fbd8d Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Mon, 26 Oct 2026 10:56:27 -0500 Subject: [PATCH] Link the exported bootstrap package's helper and runtime pack dependencies The native bootstrap's package checks copy the seed's distribution into a package directory outside the workspace and, since the CLI packages depend on their LLVM helper and runtime pack, drop the bundled copies. Nothing in that directory resolved @scriptc/llvm-linux-x64-gnu, so verify-native-cli.mjs failed with 'Cannot find module'. The test now links both packages into the directory's node_modules, as pnpm links a workspace package's dependencies. --- tests/harness/self-hosting-native-driver.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/harness/self-hosting-native-driver.test.ts b/tests/harness/self-hosting-native-driver.test.ts index 274ab8723..60969d0b2 100644 --- a/tests/harness/self-hosting-native-driver.test.ts +++ b/tests/harness/self-hosting-native-driver.test.ts @@ -106,12 +106,21 @@ test( join(packageDirectory, "package.json"), ); cpSync(distribution, join(packageDirectory, "dist"), { recursive: true }); - // The npm package depends on its LLVM helper and runtime pack. + // The npm package depends on its LLVM helper and runtime pack. Link + // them into its node_modules, as pnpm links a workspace package's + // dependencies, so the package checks resolve them. unbundlePlatformPackages( join(packageDirectory, "dist"), join(packageDirectory, "dist/bin/scriptc.json"), "@scriptc/llvm-linux-x64-gnu", ); + mkdirSync(join(packageDirectory, "node_modules/@scriptc"), { recursive: true }); + for (const name of ["llvm-linux-x64-gnu", "runtime-linux-x64-gnu"]) + symlinkSync( + join(root, "packages", name), + join(packageDirectory, "node_modules/@scriptc", name), + "dir", + ); writeFileSync(packageDirectory + ".ready", "ready\n"); } // All compiler assets must survive moving the complete distribution.