Repository navigation
Pin .w sources and the ABI-hash record to LF (fix Windows abi-hash-check red) - #942
Merged
Merged
Conversation
GitHub's Windows runners check out with core.autocrlf=true, so any text file without an eol attribute is rewritten LF->CRLF on checkout. The new abi-hash-check target reads docs/with-abi.sha256, splits it on '\n', and hashes each path it lists. On a Windows checkout the CRLF endings left a trailing '\r' on every record line, so the path column parsed as "src/FnAbi.w\r"; the comptime ToolFs project-root guard rejects any path containing a control byte and failed the target with "ToolFs path escapes project root in sha256_file: src/FnAbi.w". Fixing only the path would then surface a hash mismatch: the check hashes the raw bytes of src/FnAbi.w and src/TypeLayout.w, whose recorded sha256s were taken from the LF sources, while a CRLF checkout hashes different bytes. That hash keys every .wo bundle and must be identical on every platform, so the sources feeding it must be byte-stable across platforms. Pin all .w source and docs/with-abi.sha256 to `text eol=lf` so a Windows checkout keeps LF. No blob content changes — every tracked file is already LF in the index; this only enforces LF on future checkouts and commits.
ropoctl
added a commit
that referenced
this pull request
Sep 4, 2026
test/bundle_interface/*.wi fixtures are compared byte-for-byte against the compiler's freshly-emitted interface. Under core.autocrlf=true (GitHub's Windows runners' default) a native Windows checkout rewrites the checked-in fixture's LF to CRLF, so every read line carries a trailing "\r" the emitted (LF) interface never has -- the byte-exact comparison then fails on every line and reds bundle-interface-tests on Windows only, while it passes on Linux/mac. Root cause: the .wi fixtures were never covered by an eol=lf attribute, unlike *.w and docs/with-abi.sha256 (#942). Pin *.wi text eol=lf so the checked-out fixture bytes match emitted output on every platform. No CRLF exists in any .wi blob today, so the pin is a no-op on Linux/mac and only corrects the Windows checkout.
ropoctl
added a commit
that referenced
this pull request
Sep 4, 2026
test/bundle_interface/*.wi fixtures are compared byte-for-byte against the compiler's freshly-emitted interface. Under core.autocrlf=true (GitHub's Windows runners' default) a native Windows checkout rewrites the checked-in fixture's LF to CRLF, so every read line carries a trailing "\r" the emitted (LF) interface never has -- the byte-exact comparison then fails on every line and reds bundle-interface-tests on Windows only, while it passes on Linux/mac. Root cause: the .wi fixtures were never covered by an eol=lf attribute, unlike *.w and docs/with-abi.sha256 (#942). Pin *.wi text eol=lf so the checked-out fixture bytes match emitted output on every platform. No CRLF exists in any .wi blob today, so the pin is a no-op on Linux/mac and only corrects the Windows checkout.
ropoctl
added a commit
that referenced
this pull request
Sep 4, 2026
test/bundle_interface/*.wi fixtures are compared byte-for-byte against the compiler's freshly-emitted interface. Under core.autocrlf=true (GitHub's Windows runners' default) a native Windows checkout rewrites the checked-in fixture's LF to CRLF, so every read line carries a trailing "\r" the emitted (LF) interface never has -- the byte-exact comparison then fails on every line and reds bundle-interface-tests on Windows only, while it passes on Linux/mac. Root cause: the .wi fixtures were never covered by an eol=lf attribute, unlike *.w and docs/with-abi.sha256 (#942). Pin *.wi text eol=lf so the checked-out fixture bytes match emitted output on every platform. No CRLF exists in any .wi blob today, so the pin is a no-op on Linux/mac and only corrects the Windows checkout.
ropoctl
added a commit
that referenced
this pull request
Sep 4, 2026
test/bundle_interface/*.wi fixtures are compared byte-for-byte against the compiler's freshly-emitted interface. Under core.autocrlf=true (GitHub's Windows runners' default) a native Windows checkout rewrites the checked-in fixture's LF to CRLF, so every read line carries a trailing "\r" the emitted (LF) interface never has -- the byte-exact comparison then fails on every line and reds bundle-interface-tests on Windows only, while it passes on Linux/mac. Root cause: the .wi fixtures were never covered by an eol=lf attribute, unlike *.w and docs/with-abi.sha256 (#942). Pin *.wi text eol=lf so the checked-out fixture bytes match emitted output on every platform. No CRLF exists in any .wi blob today, so the pin is a no-op on Linux/mac and only corrects the Windows checkout.
ehartford
pushed a commit
that referenced
this pull request
Sep 5, 2026
test/bundle_interface/*.wi fixtures are compared byte-for-byte against the compiler's freshly-emitted interface. Under core.autocrlf=true (GitHub's Windows runners' default) a native Windows checkout rewrites the checked-in fixture's LF to CRLF, so every read line carries a trailing "\r" the emitted (LF) interface never has -- the byte-exact comparison then fails on every line and reds bundle-interface-tests on Windows only, while it passes on Linux/mac. Root cause: the .wi fixtures were never covered by an eol=lf attribute, unlike *.w and docs/with-abi.sha256 (#942). Pin *.wi text eol=lf so the checked-out fixture bytes match emitted output on every platform. No CRLF exists in any .wi blob today, so the pin is a no-op on Linux/mac and only corrects the Windows checkout. (cherry picked from commit 4aad416)
ehartford
pushed a commit
that referenced
this pull request
Oct 2, 2026
…ew-tests red) (#1887) contract-view-tests compares each test/contract/*.w's contract view with its .expected file byte for byte, and uat-tests compares the UAT runner's report and listing with test/uat/expected*.txt the same way. Under core.autocrlf=true (Git for Windows' default, and GitHub's Windows runners') a native checkout rewrites those files to CRLF, while the outputs are LF, so every line differs. On main 9ee1234, windows-x86_64: contract-view-tests fails on all six .expected files, and uat-tests fails on both comparisons, CR on every line. Pin them to LF, as #801 and #942 did for the embed_file fixtures and the .w sources. With this change contract-view-tests is green. uat-tests is still red on Windows for two reasons of its own (the verbs scenario's `run: ./out/bin/tmp` exits -2, and skip_platform prints `windows` where the listing expects `<host>`), but its report and listing no longer differ on line endings. Co-authored-by: Josh Hickson <[email protected]>
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.
Problem
mainis red on both Windows lanes (x86_64 and aarch64) at the green battery:Root cause
GitHub's Windows runners check out with
core.autocrlf=true, so any text file without aneolattribute is rewritten LF→CRLF on checkout.run_abi_hash_check_action(build/abi.w) readsdocs/with-abi.sha256, splits it on\nonly, and hashes the path in each record line's second column. On a Windows (CRLF) checkout
every line keeps a trailing
\r, so the path parses assrc/FnAbi.w\r. The comptime ToolFsproject-root guard (
ComptimeEval.wcomptime_tool_path_is_project_relative) rejects anypath containing a control byte (byte 13 = CR), which is the failure above — the
\risinvisible in the log, so it reads as
src/FnAbi.w.Fixing only the path would then trade the error for a hash mismatch: the check hashes the
raw bytes of
src/FnAbi.wandsrc/TypeLayout.w, whose recorded sha256s were taken from theLF sources, while a CRLF checkout hashes different bytes. That hash keys every
.wobundle(D38,
docs/with-abi.md§7) and must be identical on every platform, so the sources feedingit have to be byte-stable across platforms.
Fix
Pin all
.wsource anddocs/with-abi.sha256totext eol=lfin.gitattributes, so aWindows checkout keeps LF — same mechanism as the existing
#801pin fortest/behavior/*.txt.git add --renormalize .stages only.gitattributes); this only enforces LF on future checkoutsand commits.
the recorded sha256s.