Zulip Chat Archive

Stream: mathlib4

Topic: fix-comments.py on windows


Yury G. Kudryashov (Mar 10 2023 at 02:47):

Today, I tried to run fix-comments.py on a Windows computer. There were two issues:

  • [x] it tries to open files in the current locale which was not utf-8; fixed in !4#2761 (pending review)
  • [ ] it writes the output with CRLF newlines; I tried to add newline='\n' to some opens this didn't fix the bug.

P.S.: Then I fix the bug for me by coming home to my linux computer.

Eric Wieser (Mar 10 2023 at 06:34):

I usually just configure git to discard crlf

Yury G. Kudryashov (Mar 10 2023 at 19:05):

git discards crlf but fix-comments.py shows one huge diff chunk.

Eric Wieser (Mar 10 2023 at 20:34):

Ah, then we should ask git to normalize the whitespace before prompting the user

Eric Wieser (Mar 10 2023 at 20:34):

Because we'll have the same problem if the user is using one of the other git crlf settings


Last updated: Dec 20 2023 at 11:08 UTC