Repository navigation
Conversation
make_game copied hot_funcs.txt, hot_order.txt, the profile, hookshot.res and work/image/chunks.txt from the tools folder with shutil.copy2, which takes the source's mode along. From a read-only install (the Linux AppImage unpacked into a Nix store on NixOS, or any packaged read-only tools folder) the copies were read-only, and lift.py then stopped with "PermissionError: ... image/chunks.txt"; every later build failed on the same file. copy_writable copies the bytes only and makes an existing read-only copy writable first. Tested on NixOS with the AppImage's tools in the Nix store: the build that failed before completes. tests/test_copy_writable.py checks it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013mj4MgED5gai2jdByd6ztp
Owner
|
Thanks! This conflicts with main now (nx2/make_game.py moved a lot); could you rebase it onto main? |
Owner
|
Closing to keep the queue clear — please rebase on current main and reopen; thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
make_game.pycopiedhot_funcs.txt,hot_order.txt,hookshot_pieces.prof,hookshot.resandwork/image/chunks.txtfrom the tools folder withshutil.copy2, which takes the source's mode along. A newcopy_writable()copies the bytes only, and first makes an existing read-only copy writable again (so a work folder broken by an earlier build recovers by itself).Why
From a read-only install the copies in the work folder were read-only too, and
lift.pythen stopped withon that build and every later one. This happens with the Linux AppImage unpacked into the Nix store on NixOS (everything there is
r--r--r--), and would with any packaged read-only tools folder (a distro package, a Flatpak). Thefilecmpcheck before the copy compares contents, so copy2's timestamps were never needed.Tested
NixOS, the v2.0.1 / honest-eta AppImage's tools in the Nix store: the build that stopped at
lift.pybefore now completes, and the game runs.tests/test_copy_writable.pycopies a read-only source over a read-only leftover and appends to the result aslift.pydoes (fails onmain, passes here); wired intosource-regressions.yml.tests/test_make_game_cache.pystill passes.🤖 Generated with Claude Code