Skip to content

Write .sha512 siblings in binary mode for cross-platform parity#131

Merged
SeanTAllen merged 1 commit into
mainfrom
fix-sha512-sibling-crlf
Apr 15, 2026
Merged

Write .sha512 siblings in binary mode for cross-platform parity#131
SeanTAllen merged 1 commit into
mainfrom
fix-sha512-sibling-crlf

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

Python text mode on Windows translates \n to \r\n, so Windows-built archives would get CRLF-terminated .sha512 siblings while Linux/macOS produce LF. Future consumers (see ponyup discussion #405) byte-compare the file, so the asymmetry is a latent portability bug.

changelog-tool has no Windows release jobs today, so this is defensive. Applied for consistency with the same script duplicated across corral, ponyup, and ponyc (ponylang/ponyc#5233) pending centralization.

Smoke-tested locally: output is <hex>\n (129 bytes), byte-identical to hashlib.sha512(archive_bytes).hexdigest() + '\n' encoded as ascii, LF-only with no CR.

Text mode on Windows translates '\n' to '\r\n', which would produce
CRLF-terminated siblings for Windows-built archives while Linux/macOS
produce LF. Future consumers (ponyup discussion #405) byte-compare the
file, so the asymmetry is a latent portability bug.

changelog-tool has no Windows release jobs today, so this is defensive;
applied for consistency with the same script duplicated across corral,
ponyup, and ponyc (ponylang/ponyc#5233) pending centralization.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Apr 15, 2026
@SeanTAllen SeanTAllen merged commit 048cef6 into main Apr 15, 2026
12 checks passed
@SeanTAllen SeanTAllen deleted the fix-sha512-sibling-crlf branch April 15, 2026 01:55
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants