Zulip Chat Archive
Stream: mathlib4
Topic: import diff bot
Kim Morrison (Jan 21 2025 at 11:14):
@Damiano Testa, a bug report. When I try to follow the advice of the import diffs bot:
You can run
scripts/import_trans_difference.sh all
locally to see the whole output.
on a macos system, I get
awk: calling undefined function asort
input record number 5612, file transImports2.txt
source line number 24
<details><summary>Import changes for all files</summary>
|Files|Import difference|
|-|-|
</details>
Damiano Testa (Jan 21 2025 at 11:15):
Let me try: I only used it on Linux and it has only run on CI, as far as I know, so no MacOS testing.
Damiano Testa (Jan 21 2025 at 11:16):
Ah, I think that asort
is an internal of awk
that is not part of the MacOS distribution of awk
...
Kim Morrison (Jan 21 2025 at 11:17):
I guess we better rewrite it in Lean, then. :-)
Damiano Testa (Jan 21 2025 at 11:18):
Let me look at the script: the shell functions are very convenient, but maybe I can do the final processing of the data in Lean, and use sorting in Lean.
Damiano Testa (Jan 21 2025 at 11:19):
(Running that command switches branch back and forth and calls the python script that computes import differences: rewriting those in Lean would be lengthier.)
Kim Morrison (Jan 21 2025 at 11:19):
Mostly joking. Dog fooding is great, and we would probably learn useful things from it, but it takes a lot of time.
Damiano Testa (Jan 21 2025 at 11:21):
In the meantime, is there a way to emulate a bash shell in MacOS? I think that asort
should be available very widely in non-MacOS Unix-like terminals.
Damiano Testa (Jan 21 2025 at 11:22):
According to this, the awk
call should really be a gawk
call: maybe simply changing awk
to gawk
works for you?
Damiano Testa (Jan 21 2025 at 11:23):
Locally, the change awk
--> gawk
shows no difference in output.
Damiano Testa (Jan 21 2025 at 11:25):
This discussion suggests that gawk
is not available, but can be installed with the instructions there.
Kim Morrison (Jan 21 2025 at 11:25):
Yes, I've installed gawk
already.
Damiano Testa (Jan 21 2025 at 11:26):
Ok, and does changing the unique awk
to gawk
in the script make it work?
Kim Morrison (Jan 21 2025 at 11:26):
Yes, looks good. Thanks!
Damiano Testa (Jan 21 2025 at 11:26):
Ok, I can PR the addition of a g
to the script!
Damiano Testa (Jan 21 2025 at 11:29):
Last updated: May 02 2025 at 03:31 UTC