Skip to content

throwaway: windows job without the fix - #7

Closed
pasrom wants to merge 3 commits into
mainfrom
ci/windows-job-without-fix
Closed

pasrom wants to merge 3 commits into
mainfrom
ci/windows-job-without-fix

Conversation

@pasrom

@pasrom pasrom commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Checks that the Windows job of #6 fails on the old code. Closed without merging.

git prints file names as UTF-8, but km decoded its output with the
system's preferred encoding. On Windows that is usually cp1252, so a
tracked file with a non-ASCII name came back mangled and did not exist:

- km validate over the whole repo stopped with FileNotFoundError before
  checking anything;
- km gen-index, demote and serve, which skip names that are not files,
  silently left the doc out: gen-index said "up to date" while the doc
  was missing from its list.

Every git call now goes through one helper, paths.git(), that reads its
output as UTF-8, and validate lists files through common.tracked_md()
instead of three copies of the git call; that also stops a tracked doc
deleted but not yet staged from crashing it. promote reads its child
validator with PYTHONIOENCODING=utf-8, and km's console output escapes a
character the console encoding lacks instead of crashing.

The same platform wrote CRLF: every file km writes now gets LF, so a
generated _index.md no longer shows as changed on Windows.

Tests run km with EncodingWarning as an error, so any call that relies on
the default encoding fails them. A test runs validate and gen-index on
names with an u-umlaut and an o with double acute under an ASCII and a
Latin-1 encoding. CI gains a Windows job that checks a non-ASCII name is
found and that km writes LF; the release waits for it.
@pasrom

pasrom commented Sep 24, 2026

Copy link
Copy Markdown
Owner Author

Confirmed: the windows job fails on the old code.

@pasrom pasrom closed this Sep 24, 2026
@pasrom
pasrom deleted the ci/windows-job-without-fix branch September 24, 2026 07:18
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.

1 participant