From e35eafdb083c146d8223b6f6f68051b26e19a27c Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 13 Aug 2024 16:30:56 +0100 Subject: [PATCH 1/2] fix(world): read system source from root dir --- packages/world/ts/node/render-solidity/worldgen.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/world/ts/node/render-solidity/worldgen.ts b/packages/world/ts/node/render-solidity/worldgen.ts index 3305b8b27b..097558e681 100644 --- a/packages/world/ts/node/render-solidity/worldgen.ts +++ b/packages/world/ts/node/render-solidity/worldgen.ts @@ -49,7 +49,7 @@ export async function worldgen({ await Promise.all( systems.map(async (system) => { - const data = await fs.readFile(system.sourcePath, "utf8"); + const data = await fs.readFile(path.join(rootDir, system.sourcePath), "utf8"); // get external functions from a contract const { functions, errors, symbolImports } = contractToInterface(data, system.label); const imports = symbolImports.map( From 84509c5efee679da9ead5ffc7db31b4765d7e750 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 13 Aug 2024 08:33:54 -0700 Subject: [PATCH 2/2] Create twenty-trains-bathe.md --- .changeset/twenty-trains-bathe.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twenty-trains-bathe.md diff --git a/.changeset/twenty-trains-bathe.md b/.changeset/twenty-trains-bathe.md new file mode 100644 index 0000000000..547ed15a58 --- /dev/null +++ b/.changeset/twenty-trains-bathe.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/world": patch +--- + +Fixed an issue with worldgen when using a different `rootDir` from the current working directory, where worldgen would read system source files from the wrong place.