Repository navigation
lean check: read sources as UTF-8 on every platform - #2097
Merged
Merged
Conversation
Owner
|
Thanks @BobClawblaw. Reading as UTF-8 makes the count the same everywhere, and forcing cp1252 to reproduce the Windows number was a neat way to show it. Ready to land. |
Without an encoding, read_text uses the locale's (cp1252 on Windows), so a multi-byte UTF-8 character counts as several columns there and the count differs from Linux and macOS.
Owner
|
Thank you @BobClawblaw. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Owner
|
Thanks @BobClawblaw! This is in TensorFold 1.2.3, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.3 |
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 this changes
tools/zig/lean_check.pynow reads sources as UTF-8. Before, it used the locale's encoding, which is cp1252 on Windows, so each multi-byte character counted as two or three columns there and the count differed from Linux and macOS. After, every platform counts the same.lean_new.pyalready reads as UTF-8.3bdc4e54a)atc overlap --json: no overlap for this change. Coverage was incomplete (pullFilesLimit,pullFilesUnavailable,timeLimit), so I checked the file lists of all open pull requests by hand: none touchestools/zig/lean_check.py.Checks on this head
611c0a5f4python3 tools/zig/lean_check.py, on the base and on this head: 425 and 425, 0 new (lean_new.py).023def309.Receipt
n/a: a development tool that cannot reach inference.
Checklist