Skip to content

fix(tests): the write-back shadow remake check builds on Windows - #2868

Closed
mooki000 wants to merge 1 commit into
NotRexed:mainfrom
mooki000:fix/wb-shadow-remake-windows-build
Closed

mooki000 wants to merge 1 commit into
NotRexed:mainfrom
mooki000:fix/wb-shadow-remake-windows-build

Conversation

@mooki000

Copy link
Copy Markdown
Contributor

What this is for: tests/test_wb_shadow_remake.py (added by #2767) does not compile on Windows, so part 2/2 of the Windows Python source checks is red on main and on every pull request merged with it. What is measured: the same check on Windows, in the project's own workflow, before and after; Linux with two compilers. Not measured: nothing else changes, so nothing else was run.

Problem

The check's fixture reads the environment through gpu/vk/compat/hookshot_env.h and getenv. With MSVC's headers getenv is deprecated, and the check compiles with -Werror:

gpu/vk/compat/hookshot_env.h:53:21: error: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead.
3 errors generated.

Linux never showed it. Main's own runs have been cancelled by the next merge all day, so no completed run of main shows it either; I found it in the Windows log of a docs-only pull request (#2778).

What changed

One flag on the fixture's command line: -D_CRT_SECURE_NO_WARNINGS, which 34 other checks already pass. The fixture and its assertions are untouched.

How it was tested

  • Windows, the project's workflow, run on my fork before opening this: with the change tests/test_wb_shadow_remake.py passes (1.1 s) and Windows part 2/2 is green. Without it, the same job fails on this test alone: #2778's run.
  • Linux: the check passes with GCC 16.2 and with Clang 23.1, before and after (the flag does nothing there).
  • A Windows-target compile here (clang against MSVC-style headers, syntax only): fails with the three errors above without the flag, passes with it.

That fork run still shows red in three other jobs. Both failing tests there are main's own and have fixes open: test_program_cache_one_variant.py (#2861) and test_readme_menu_rows.py (#2857). With those two and this one, main's source checks are green again.

Assisted-by: Claude Fable 5.2
Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

tests/test_wb_shadow_remake.py (NotRexed#2767) compiles a fixture that reads the
environment through gpu/vk/compat/hookshot_env.h and getenv. With MSVC's
headers getenv is deprecated, and under the check's -Werror that is an
error, so the Windows part 2/2 of the Python source checks has failed on
main since the merge (3 errors, all "'getenv' is deprecated"). Linux was
never affected.

Pass -D_CRT_SECURE_NO_WARNINGS on the fixture's command line, as 34 other
checks already do. Nothing else changes; the fixture and its assertions
are untouched.

Assisted-by: Claude Fable 5.2
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@mooki000

Copy link
Copy Markdown
Contributor Author

Closing: #2883 has merged the same one-flag fix for this test (-D_CRT_SECURE_NO_WARNINGS on the write-back shadow remake fixture), so main's Windows check is covered. Thanks @SadTransGirl.

@mooki000 mooki000 closed this Nov 12, 2026
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.

1 participant