mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:15:52 +01:00
[PR #43] [MERGED] OLD-7148: make_game and first_light rebuild or report a stale vk_pipeline_check / vk_harness #95
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#95
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/43
Author: @ItsMrDubey
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:stale-vk-tools📝 Commits (1)
dfd2392make_game, first_light: a vk_pipeline_check or vk_harness older than its sources is rebuilt or reported, not reused silently📊 Changes
5 files changed (+207 additions, -8 deletions)
View changed files
📝
make_game.py(+30 -6)📝
tests/test_first_light_harness_paths.py(+46 -0)📝
tests/test_make_game_pipeline_preflight.py(+59 -0)📝
tools/first_light.py(+22 -2)➕
tools/stale_build.py(+50 -0)📄 Description
Claimed in the coordination issue as: OLD-7148 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7119646964)
What and why
Old #7148:
make_game.pyandtools/first_light.pytook whichevervk_pipeline_check/vk_harnesswas already inruntime/buildand used it without checking it. After a pull that changed the program, they kept running the binary built from the old sources and said nothing.make_game.pyonly built the Linux checker when it was missing.first_light.pynever builds anything. No old-pr branch in #17 covers this, so this is a new fix.The fix:
tools/stale_build.py.newer_sources(exe, root, name)returns the sources ofruntime/test/<name>.cppthat are newer thanexe. That means the.cppplus every header it pulls in through#include "...", followed recursively.runtime/CMakeLists.txtis left out on purpose: a CMake change that doesn't touch the program doesn't relink it, so counting it would flag a current binary as stale on every run.make_game.pypreflight, off Windows: the checker is now rebuilt when it is stale as well as when it is missing. This uses the existingbuild_pipeline_check, which runs an incrementalcmake --build. If CMake isn't installed, the existing checker is still used, as before.make_game.pypipelines(), on all platforms: before the stage starts it logs a WARNING if the checker is still older than its sources. The warning names the changed files and how to rebuild (on Windows: the runtime stage with VULKAN_SDK set).first_light.pyfind_harness()prints the same kind of warning to stderr for a stalevk_harness.runtime/buildare compared. A--runtime-build,--harnessorLEONIDA_VK_HARNESSbinary from another folder is not: its timestamp says nothing about these sources.Tested
Windows 11, Python 3.11.9, no GPU or compiler needed (synthetic files with set mtimes; the build is mocked).
runtime/build/linux/vk_pipeline_checkolder thanruntime/test/vk_pipeline_check.cpp, withos.namemocked to posix and CMake present.preflight(["pipelines"])did not callbuild_pipeline_check. With this branch it does.python -I tests/test_make_game_pipeline_preflight.py: OK (20 tests, 1 POSIX-only skip). New tests: a stale checker is rebuilt; a current one is not; without CMake a stale one is used andpipelines()logs the warning; a checker outsideruntime/buildis not compared.python -I tests/test_first_light_harness_paths.py: OK (7 tests). New tests: a stale harness is warned about, including a header underruntime/src; a current one is quiet; an explicit harness outside the build folder is not compared.tests/test_first_light*.py,test_leonida_tui.py,test_make_game_{assets_*,container,empty_translation,interrupt,pick,pipeline_batches,progress,python_version,resume,submodule,translate_cleanup,translation_completeness,translator_flags}.py, and the shader/audio/bvh/fspx/ttpf stage tests that import make_game: all OK.test_make_game_{argparse,destinations,dry_run,paths,pipelines,platform,preflight,wave64}.pyfail on this machine (Python 3.11, Windows). They fail the same way on origin/main: I compared the failure counts for each file, and the full list of failing test names fortest_make_game_preflight.py, which is identical.python -I scripts/check_no_game_data.pyon every changed file: clean.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. n/a: no translator rule🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.