Repository navigation
Conversation
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 5c3dd84a on Windows 11: python -I tests/test_world_build.py -> 60 tests, OK (1 skipped); git diff --check clean.
This overlaps #4433 (c3318b7d): #4433 makes the same unlistable-sub-folder fix in tools/world_build.py (and also make_game/meshlet_page) with its own tests, and git merge-tree reports a conflict between the two branches. #4433 is the broader change and was opened first; this PR should close or rebase onto it.
|
Converging as the coordinator asked: the single PR carrying the unlistable-sub-folder family is #4433 (BUILD-1274, claimed 31 seconds before ours, with make_game, meshlet_page and world_build all in one scope). Nothing unique is lost from this one - its os.walk(onerror=raise) plus main-level one-ERROR-line pattern is the same shape our meshlet_page twin (below) uses, so if #4433 wants that phrasing for meshlet_page it is free to take it. AI-assisted. |
Claimed in the coordination issue as: #4257 (comment)
What and why
world_build.py discover_model_manifestsandindex_ttpf_textureswalk an assets tree withos.walk(abs_root)and noonerror. os.walk silently skips a sub-folder it cannot list, so a build droppedthat sub-folder's manifests/textures and proceeded as if the scan were complete. Reproduced on 03b09a0:
discover_model_manifestson a tree with amodels/manifest.jsonin the root and in a sub-folder returns 2;after
chmod 000on the sub-folder it returns 1, no error. Both walks now pass anonerrorthat re-raises,which
main()'s existingexcept (FileNotFoundError, ValueError, OSError)turns into oneERROR:line(exit 1). Same os.walk/onerror completeness gap as #4277 / #4342 / #4355 / #4372 / #4385 / #4404 / #4417.
Tested
Linux, Python 3.14.10, CPU only, no game files (synthetic manifests).
tests/test_world_build.py::WorldBuildTest::test_unlistable_subfolder_is_a_clean_error_not_a_silent_skip:chmod 000a sub-folder, bothdiscover_model_manifestsandindex_ttpf_texturesraise OSError (skips whenthe folder is still listable, e.g. running as root or on Windows). Red on the base: no raise. Green: whole
file 60 OK.
python -m compileall -q make_game.py tools tests,git diff --checkclean.Checklist
docs/design.md, with how it was confirmed. (no translator rule changed)AI-assisted (Tacit).