OLD-7067: build scripts refuse a folder with % in its path up front #378
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/378"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by lines9686-rgb on 2026-11-24T04:11:27Z.
Claimed in the coordination issue as:
OLD-7067(carried over from the original repository, same author)What and why
A checkout with
%in its path fails late and confusingly:cmd.exeexpands%...%in the generated_build.cmd, andcl.exerejects a%in the path-valued/Ddefinitions of the runtime's test targets (D8038) however it is quoted (@ezbyDev's measurements in the original repository).build_runtime.ps1now stops before looking for Visual Studio when the checkout path has a%, andbuild_llvm_mc.ps1when-Temphas one, each naming the folder; docs/testing.md gets a Known-problems row.Tested
python tests/test_build_percent_path.py(runs both scripts with such a path, with git, python and vswhere hidden so a missing check cannot start a real build): OK on Windows 11.GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.scripts/check_no_game_data.pyover every changed file: clean).docs/design.md: n/a🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T05:28:42Z.
Adds only the two
%path guards and their test: no URLs, downloads, elevation or execution-policy changes (the test's-ExecutionPolicy Bypassapplies only to the child it starts). Safe. Nit: a relative-Tempunder a working directory containing%skips the check.Security review; read only, nothing run.
AI-assisted (Claude Code, Claude Opus 5.5).
Discord: bigpeppa.
Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T05:43:31Z.
Tested on native Windows 11 (RTX 4070 SUPER), merged onto main
8f481cf16(clean merge):build_llvm_mc_*andbuild_runtime_*tests: 14 passed on main, 16 passed with this PR (the 2 new ones intests/test_build_percent_path.py;python -I tests/test_build_percent_path.pyis OK too).compileallclean.p%qis refused ("contains '%'"), and so is-Temp a%b. Normal paths get past the guard and stop later where expected (missing vswhere or git; nothing was built).Looks good to merge from my side once CI is green. The current
macosandlinux-gpu-toolsfailures are GPU shader tests on MoltenVK (cs_fma_fused,ps_ssharp,cs_imgload*_tfe), which this change doesn't touch; I'll confirm they fail on main too before merging.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by lines9686-rgb on 2026-11-24T05:53:49Z.
Thanks for the review and the Windows run. The nit is fixed in the new commit:
build_llvm_mc.ps1now checks the full path-Tempresolves to, so a relative-Tempunder a working directory containing%is refused too.tests/test_build_percent_path.pygets that case (it fails without the change, passes with it); 3/3 OK on Windows 11.The
macosandlinux-gpu-toolsfailures are the MoltenVK GPU shader tests you named; this PR touches neither.Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T06:32:13Z.
Merging. Why merged: the build scripts now refuse a checkout or -Temp folder whose path contains '%' up front, instead of failing later in confusing ways; the reviewer nit (a relative -Temp) was fixed in
2a4f650.Why it's good: security-reviewed (only path guards and a test: no URLs, downloads, elevation or policy changes). Tested on Windows 11 (RTX 4070 SUPER) merged onto main
8f481cf: build_llvm_mc/build_runtime tests 14 passed on main -> 17 passed with this PR; compileall clean; in Windows PowerShell 5.1 a path with '%' and '-Temp a%b' are refused while normal paths pass the guard. The earlier CI failures (macos/linux-gpu-tools MoltenVK shader tests) are unrelated to these scripts.AI-assisted (Claude Code, Claude Opus 5.5).