mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:10:51 +01:00
[PR #1265] tools: one cached work_root() per shader instead of nine realpath() calls (OLD-9777) #1296
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#1296
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/1265
Author: @ambroseautomation
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:carry/old-9777-work-root-cache📝 Commits (3)
a1c1e4ctools: one cached work_root() instead of nine repeated realpath() calls per shadere3bb670report_paths: resolve a relative work_root every time, never from the cache74cc3ebtests: compare work_root with the resolved temporary folder, as the function returns it📊 Changes
4 files changed (+65 additions, -10 deletions)
View changed files
📝
tests/test_report_paths.py(+28 -0)📝
tools/rdna2spirv.py(+6 -6)📝
tools/report_paths.py(+25 -0)📝
tools/shader_meta.py(+6 -4)📄 Description
Claimed in the coordination issue as: OLD-9777 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144385534)
What and why
Carries forward
old-pr/9777(draft #55, original commit authorpes7preserved across all 3 commits; indexed in #17), rebased cleanly onto currentmain(0b45fdc21).Replaces repeated
os.path.realpathcalls per shader intools/rdna2spirv.pyandtools/shader_meta.pywith a cachedwork_root()helper intools/report_paths.py:os.path.realpathfor absolute paths so translating a shader resolves its work root once instead of nine times (byte-identical output).WorkRootTestsintests/test_report_paths.pyverifying absolute-path caching, relative-path re-resolution afteros.chdir, and 8.3 short-path compatibility on Windows.Tested
python -I tests/test_report_paths.py -v: 24 tests, OK (1 skipped: Windows symlink privilege).python -m compileall -q make_game.py tools tests: exit 0.python -I scripts/check_no_game_data.py tools/report_paths.py tools/rdna2spirv.py tools/shader_meta.py tests/test_report_paths.py: exit 0 (no game data).GPUs tested: n/a (Python path resolution helper + stdlib unit tests on Windows 11 Pro 64-bit, Python 3.12.10)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a — path-resolution caching only, no codegen changes)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.