Skip to content

Find Windows CMake and Ninja in paths containing square brackets - #7798

Open
philip-roy-jones wants to merge 1 commit into
ItsNotRexed:mainfrom
philip-roy-jones:philip-roy-jones/boston-build-fix-triage
Open

philip-roy-jones wants to merge 1 commit into
ItsNotRexed:mainfrom
philip-roy-jones:philip-roy-jones/boston-build-fix-triage

Conversation

@philip-roy-jones

@philip-roy-jones philip-roy-jones commented Nov 23, 2026 •

Copy link
Copy Markdown

On Windows, Find-BuildTool can skip an installed CMake and Ninja when a directory in the resolved path contains square brackets, such as [sdk]. PowerShell interprets those characters as a wildcard pattern. The runtime build can then take the direct compiler fallback and omit the SDL3 GameInput shim. Coordination claim RT-651

I changed the two file checks in scripts/build_runtime.ps1 to use Test-Path -LiteralPath ... -PathType Leaf. The Windows regression covers both a bracketed Visual Studio installation and tools found under a bracketed PATH directory.

Depends on: #7363 (textual conflict in the selector and its tests; either PR can land first). The tested combination retains #7363's capability checks and both sets of regression cases.

Tested

Windows PowerShell 5.1 and Python 3.13.1, using synthetic tool files. Both new subtests failed against parent 7c082165. On 7186024c:

These checks exercised tool discovery and batch generation. Runtime compilation and GPU testing were outside this run.

AI-assisted: yes. The fixtures contain only synthetic data.

PowerShell treats brackets in a tool directory as a wildcard pattern.
Find-BuildTool could therefore skip installed CMake and Ninja and send
the runtime build through the cl.exe fallback without the GameInput shim.
Check the preferred Visual Studio tools and the applications returned by
Get-Command using their literal paths.

Cover both lookups with synthetic tool directories on Windows.

Claim: ItsNotRexed#7599 (comment)
@azterixx

Copy link
Copy Markdown

checked: #7798 | with: python -I -m unittest discover -s tests -p test_build_runtime_fallback.py | on: macOS 27.2.1, Apple M1 Pro, CPython 3.15.2, head 7186024, CPU only | result: pass (8 tests, 1 skipped; main@dde82f27e has 8, 1 skipped)

@TieruYT

TieruYT commented Nov 23, 2026

Copy link
Copy Markdown

Windows, synthetic inputs. Tested 7186024.

The Windows PowerShell discovery test found the fixture CMake and Ninja executables under both [sdk] and VS [2022]. The same test with the earlier script failed. This exercises executable path resolution with literal square brackets.

AI-assisted verification · GPT-6.2 Astra Medium

@airp1ane

Copy link
Copy Markdown
Contributor

Tested 7186024 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass.

Ran the test files this PR adds or changes, from a clean checkout of the PR head: test_build_runtime_fallback.py - all exit 0.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants