fix(build): the compiler check names a folder Windows lets no program list, and never says "no message" #1238

Merged
HumanBean merged 1 commit from HumanBean/Longshot:fix/compiler-check-blocked-folder into main 2026-11-16 23:08:33 +00:00
Owner

Type: fix · Risk: low · Tested on: Linux (game-free checks) · Needs: Windows, any GPU

Why

A player couldn't check or build because the builder said "The builder's own compiler (tools/llvm-mingw) could not build a test program: no message", and pointed at their antivirus, which was already off. Their Desktop sits inside C:\Users\<name>\Cookies, a junction Windows keeps for old programs that lets no program list it, and LLVM's clang stops as it starts there (…\clang.exe: permission denied, exit 1). That line has no "error" in it, so the check said "no message". Fixes #1010.

How to reproduce

Seen on: Windows 10.0.26300, x64 (the reporter's PC), launcher nightly-100, tools nightly-358
Settings and switches: defaults
Steps: unzip the portable launcher into a folder under C:\Users\<name>\Cookies (there, a Desktop moved into it), then check a .nup
Expected: a message that says what is wrong and what to do
Actual: "could not build a test program: no message. Unpack the zip again into a folder your antivirus allows."

What changed

check_mingw now says what stopped the compiler. Under a folder Windows lets no program list, it names that folder and says to move Longshot out of it. Otherwise it gives the compiler's first error, or its last line and exit code (an NTSTATUS in hex on Windows), never "no message".

  • builder: unlistable_above() and compiler_failure() in nx2/make_game.py, used by check_mingw() only when the test compile has already failed.
  • tests: tests/test_compiler_check.py, game-free: the first error, the last line with the exit code, no output, Linux, and the highest folder that denies listing.
  • The new message starts "Windows doesn't let programs look inside", the words the launcher's companion PR (MagicBeanDev/LongshotLauncher#154) matches. That PR also says it before the builder runs at all.

Measurements

Nothing to measure: a message in the builder's compiler check, which runs only once the test compile has failed.

Flags and settings

None

Testing

Tested: on Linux, tests/test_compiler_check.py (5 tests, the Windows listing refusal simulated) and python -I -B tests/run_all.py: 593 passed, 18 failed, and the same 18 fail on main @ 31f8d8be on this PC (test_bug_report_defaults, test_crt_options, test_damage_debug_menu, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_lift_lookups, test_linux_preflight, test_linux_update, test_make_game_cache, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_run_all_changed, test_upscaler_rows, test_vk_occlusion_queries, test_walk, test_walk_key). The reporter's own run showed the cause on Windows: clang under C:\Users\<name>\Cookies\Desktop\… printed permission denied and exited 1.

Not tested: this builder on Windows, and no run in the game: the change is only in the compiler check's failure path, which the game doesn't run.

Must be tested:

  • Windows, any GPU: put the builder's tools under a folder that denies listing (mkdir C:\LsTest\Launcher, unzip there, icacls C:\LsTest /deny "Everyone:(RD)"; undo with icacls C:\LsTest /remove:d Everyone), then check a .nup, expecting "Windows doesn't let programs look inside C:\LsTest…" (by hand: the check's message)

Risks

What could break: nothing on a working PC. Both new functions run only after the test compile failed, and a listing error other than a refusal is ignored.

Turning it off: revert the commit

Compatibility: Nothing changes

Issues

Fixes #1010

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.

🤖 Generated with Claude Code

**Type:** fix · **Risk:** low · **Tested on:** Linux (game-free checks) · **Needs:** Windows, any GPU ## Why A player couldn't check or build because the builder said "The builder's own compiler (tools/llvm-mingw) could not build a test program: no message", and pointed at their antivirus, which was already off. Their Desktop sits inside `C:\Users\<name>\Cookies`, a junction Windows keeps for old programs that lets no program list it, and LLVM's clang stops as it starts there (`…\clang.exe: permission denied`, exit 1). That line has no "error" in it, so the check said "no message". Fixes #1010. ## How to reproduce **Seen on:** Windows 10.0.26300, x64 (the reporter's PC), launcher nightly-100, tools nightly-358 **Settings and switches:** defaults **Steps:** unzip the portable launcher into a folder under `C:\Users\<name>\Cookies` (there, a Desktop moved into it), then check a `.nup` **Expected:** a message that says what is wrong and what to do **Actual:** "could not build a test program: no message. Unpack the zip again into a folder your antivirus allows." ## What changed `check_mingw` now says what stopped the compiler. Under a folder Windows lets no program list, it names that folder and says to move Longshot out of it. Otherwise it gives the compiler's first error, or its last line and exit code (an NTSTATUS in hex on Windows), never "no message". - builder: `unlistable_above()` and `compiler_failure()` in `nx2/make_game.py`, used by `check_mingw()` only when the test compile has already failed. - tests: `tests/test_compiler_check.py`, game-free: the first error, the last line with the exit code, no output, Linux, and the highest folder that denies listing. - The new message starts "Windows doesn't let programs look inside", the words the launcher's companion PR (MagicBeanDev/LongshotLauncher#154) matches. That PR also says it before the builder runs at all. ## Measurements Nothing to measure: a message in the builder's compiler check, which runs only once the test compile has failed. ### Flags and settings None ## Testing **Tested:** on Linux, `tests/test_compiler_check.py` (5 tests, the Windows listing refusal simulated) and `python -I -B tests/run_all.py`: 593 passed, 18 failed, and the same 18 fail on `main` @ 31f8d8be on this PC (test_bug_report_defaults, test_crt_options, test_damage_debug_menu, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_lift_lookups, test_linux_preflight, test_linux_update, test_make_game_cache, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_run_all_changed, test_upscaler_rows, test_vk_occlusion_queries, test_walk, test_walk_key). The reporter's own run showed the cause on Windows: clang under `C:\Users\<name>\Cookies\Desktop\…` printed `permission denied` and exited 1. **Not tested:** this builder on Windows, and no run in the game: the change is only in the compiler check's failure path, which the game doesn't run. **Must be tested:** - Windows, any GPU: put the builder's tools under a folder that denies listing (`mkdir C:\LsTest\Launcher`, unzip there, `icacls C:\LsTest /deny "Everyone:(RD)"`; undo with `icacls C:\LsTest /remove:d Everyone`), then check a `.nup`, expecting "Windows doesn't let programs look inside C:\LsTest…" (by hand: the check's message) ## Risks **What could break:** nothing on a working PC. Both new functions run only after the test compile failed, and a listing error other than a refusal is ignored. **Turning it off:** revert the commit **Compatibility:** Nothing changes ## Issues Fixes #1010 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(build): the compiler check names a folder Windows lets no program list above the compiler, and says the compiler's own last words and exit code instead of "no message" (#1010)
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 14s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Third-party parts / As their notes say (pull_request) Successful in 20s
PR description / Description follows the template (pull_request_target) Successful in 6s
d9b7f6a484
Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from WIP: fix(build): the compiler check names a folder Windows lets no program list, and never says "no message" to fix(build): the compiler check names a folder Windows lets no program list, and never says "no message" 2026-11-16 21:33:58 +00:00
HumanBean deleted branch fix/compiler-check-blocked-folder 2026-11-16 23:08:33 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1238
No description provided.