You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A path source with build_dir inside the project copies itself recursively #16
fetch_code copies a path source with a plain shutil.copytree(path, code_path). When build_dir is inside the project folder, the copy includes build_dir, which contains the copy being written. It recurses (build/game-source/build/game-source/...) until the OS rejects the path.
Relevant code: inputs/code.py, lines 83–85.``
This is the natural layout for a local game: the config sits in the game's folder with path: "." and build_dir: build.
Reproduction (calling fetch_code.func directly):
Create game/ with pxt.json and main.ts, plus game/build/.redun-cache.db, as a previous build would leave it.
It fails with shutil.Error listing paths like game/build/game-source/build/game-source/build/game-source/....
Even without the loop (for example, build_dir in a subfolder that copytree reaches later), the source copy would include earlier build output: each website stage carries its own node_modules, about 500 MB per game. build_binary_js then copies all of it again.
Expected behavior: a path source never copies build_dir. Either skip it in the copy (copytree(..., ignore=...), possibly also built/, node_modules/ and pxt_modules/), or reject a build_dir inside the source in resolve_config_paths with a clear error.
Found while reviewing PR #7, toolchain at ce12c48.
changed the title [-][P1] A path source with build_dir inside the project copies itself recursively[/-][+]A path source with build_dir inside the project copies itself recursively[/+]on Nov 4, 2026
Prefer to reject instead of having to skip over own directory. Simpler to require users to keep it in a separate folder, expected they'll keep it next to the project directory.
Activity
[-][P1] A path source with build_dir inside the project copies itself recursively[/-][+]A path source with build_dir inside the project copies itself recursively[/+]UnsignedArduino commentedon Nov 7, 2026
Prefer to reject instead of having to skip over own directory. Simpler to require users to keep it in a separate folder, expected they'll keep it next to the project directory.
Reject a path source that overlaps build_dir