fix(scripts): check_third_party reads git check-ignore in bytes, so Windows skips ignored files #80
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!80
Loading…
Reference in a new issue
No description provided.
Delete branch "d4nkn3ss/Longshot:fix/check-third-party-windows-newlines"
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?
Why
On Windows,
scripts/check_third_party.pyfails on any checkout set up the way CONTRIBUTING.md says: the Builder's binaries copied intothird_party/(a64emit.dll,lld-link.exe,SDL2.dll,zbic.dlland others) are counted although.gitignoreleaves them out, so a64-kit, sdl2 and zbic "differ from their notes".What changed
ignored()inscripts/check_third_party.pysends the paths togit check-ignore --no-index --stdinas UTF-8 bytes and decodes the reply, instead oftext=True. In text mode on Windows, Python writes each\nas\r\n, so git read every path with a trailing\r, matched no rule, and nothing was skipped. Linux is unchanged: it was already bytes-for-bytes the same there.Flags and settings
None
Measurements
Not a performance change, so no fps or timings: the check's result on both sides.
main:
77f605a2(2026-11-12)this PR: fix/check-third-party-windows-newlines @
388d24f8Hardware: Windows 11, Python 3 from python.org, git 2.56.1 (
core.autocrlf=true)Scene: n/a (game-free)
Method: each command run once on each side, on the same checkout, set up as CONTRIBUTING.md says with the Builder's third_party binaries copied in
How to reproduce: on Windows, copy the Builder's
tools\third_partybinaries in as CONTRIBUTING.md says, then run the two commands below77f605a2388d24f8python -I scripts/check_third_party.pythird_party: 11 parts as their notes saypython -I -B tests/test_check_third_party.pyTesting
Tested: the two commands above on Windows 11, on main and on this PR, and:
git check-ignore --no-index --stdingiventhird_party/sdl2/SDL2.dll\nthrough Python withtext=Trueprints nothing (exit 1); given the same bytes it prints the path (exit 0).HEADon disk, so the difference was only the ignored binaries.python -I -B tests/run_all.pyon this branch: 456 passed, 4 failed.test_setup_runtime.pyandtest_release.pyfail on main @77f605a2too.test_fpx_sticky.pyandtest_spawn_emit.pypass when run alone, on main and here. In the full run,test_fpx_sticky.pyfailed becauseLONGSHOT_MINGWwasn't set in that shell; whytest_spawn_emit.pyfailed only in the full run I don't know.Not tested: Linux and macOS: the bytes and text paths are the same there, and CI's third-party job runs on Linux.
Needs other testers: None
Screenshots
Nothing on screen
Risk and rollback
Only the check script changes; reverting the commit is enough. If
git check-ignoreever printed a path that isn't UTF-8, the decode would fail loudly rather than quietly hashing the file.Reviewer notes
CI runs this check on Linux only, which is why it didn't catch this.
Issues
None
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run. (n/a)MKWVK_API_VERSIONbumped (gpu/vk/vk_api.h'sMkwVkHostorMkwVkRendererchanged). (n/a)mainand passing here. (The existingtests/test_check_third_party.pyalready does on Windows: 2 failures on main, OK here.)tests/that reads changed source updated in this PR, not weakened. (n/a)🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.