Repository navigation
fix(build): 🐛 Sort every walked folder and date archives by the last config commit so builds match across machines - #59
Merged
Conversation
…config commit so builds match across machines
Stoupy51
added a commit
that referenced
this pull request
Oct 6, 2026
…config commit so builds match across machines (#59)
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.
A Windows build and a Linux build of the same project gave different outputs: NTFS lists a folder in alphabetical order, ext4 in hash order.
Sorted file walks
Every
os.walk,os.listdir,globandrglobwhose order reaches the output is now sorted:beet_patches.fast_list_files: the order a pack loads its files (and so the zip entry order)sounds:sounds.jsonentriesrecords,simplenergygui and cables,ingame_manualfont textures: definitions and generated fileslibs,merge_smithed_weldglob: merge ordercompute_sha1:sha1_hashes.jsonkey ordermaterials,item_models,custom_blocks,ingame_manual),custom_paintingsandproject_images: which file wins when two textures share a nameSorted order equals the NTFS one for lowercase names, so Windows builds do not reorder.
Walks used only for lookups, the CLI,
dumpandmigrateare left as they are.Archive date
get_consistent_timestampfirst uses the date of the last commit of the beet config found bylocate_config(any ofDETECT_CONFIG_FILES), in UTC, which is the same in every clone. Git does not keep file modification times, so the beet cache mtime is only the fallback outside a git repository, then 2025-01-01.In a shallow clone that does not reach the last commit of the config, the date is the one of the shallow boundary.
Not covered
PNG bytes still differ between Windows and Linux with identical pixels: Pillow does not ship the same zlib on both.
Checks
sounds.json,_give_all,creative_loot_table.json,set_items_storageanddefinitions_debug.jsonare byte-identical to the Windows build, and two builds with differentPYTHONHASHSEEDare identical.scripts/all_doctests.pyandscripts/run_integration_tests.py(33/33) pass.stouputils checkreport nothing new, apart from one line added to the already longfast_list_filesdocstring.