Zulip Chat Archive

Stream: general

Topic: lean --make doesn't show sorries the second time round


Bhavik Mehta (Jul 07 2020 at 16:48):

Running lean --make on a file with sorries gives the warnings, but only the first time it's run; is there a switch I can do to make it show the warnings every time?

Kevin Buzzard (Jul 07 2020 at 17:45):

You can remove the olean as a workaround

Bhavik Mehta (Jul 07 2020 at 18:42):

I guess this works but I'd really rather not make things recompile again

Bryan Gin-ge Chen (Jul 07 2020 at 18:43):

You could rename the oleans and then rename them back...

Reid Barton (Jul 07 2020 at 18:46):

Import it from another file?

Reid Barton (Jul 07 2020 at 18:46):

which warnings do you want?

Reid Barton (Jul 07 2020 at 18:47):

If you want to know about all the warnings then of course lean needs to rebuild the file, right?

Bhavik Mehta (Jul 07 2020 at 18:51):

Right but if it's already built then I should be able to get the warnings? For errors, if I do lean --make twice I get all the errors both times, but not for warnings

Reid Barton (Jul 07 2020 at 18:57):

If there are errors then Lean doesn't write an .olean file I think, so this is a different situation

Reid Barton (Jul 07 2020 at 19:00):

Bhavik Mehta said:

but not for warnings

I don't understand what this means

Reid Barton (Jul 07 2020 at 19:01):

do you mean if there are only warnings?

Bhavik Mehta (Jul 07 2020 at 19:03):

Yeah if there are only warnings

Bhavik Mehta (Jul 07 2020 at 19:03):

Reid Barton said:

If there are errors then Lean doesn't write an .olean file I think, so this is a different situation

Ah I didn't know this, I see

Bhavik Mehta (Jul 07 2020 at 23:19):

image.png By the way, this is what I wanted it for - it's nice to see at a glance which files are broken by a mathlib bump in a project

Johan Commelin (Jul 08 2020 at 04:39):

@Bhavik Mehta Hey, that looks nice! Are you preparing a PR to leanproject?

Bhavik Mehta (Jul 08 2020 at 04:42):

I can, but it's pretty slow and pretty hacky

Bhavik Mehta (Jul 08 2020 at 04:44):

I didn't want to recompile everything each time it's run so it searches for the bytestring "orry" in the compiled oleans to check for sorries

Johan Commelin (Jul 08 2020 at 04:48):

lol, nice hack

Bhavik Mehta (Jul 08 2020 at 04:49):

luckily none of my lemmas are called worry

Johan Commelin (Jul 08 2020 at 05:01):

Wait till we start formalising self-driving cars. That will give you lots of lorry and worry...

Jasmin Blanchette (Jul 08 2020 at 06:14):

Seriously, worry might have been a better name for sorry. In Isabelle, where it's from, we also have oops, for "forget this proof attempt". A common mistake is to mix up oops and sorry, ending up with a "lemma" one knows is unprovable. The names are clever and funny, but perhaps too clever for their own good.

Johan Commelin (Jul 08 2020 at 06:21):

We should take more advantage of the fact that lean supports unicode: I suggest replacing sorry with :oops: :scream: :boom: :see_no_evil:

Simon Hudon (Jul 08 2020 at 14:24):

@Johan Commelin I think @Jasmin Blanchette was recommending less cleverness and more clarity.

Patrick Massot (Jul 08 2020 at 14:27):

I think Johan understood.

Gabriel Ebner (Jul 08 2020 at 14:33):

Historical side remark: as you all know, the synthetic sorrys that Lean inserts for syntax errors are printed as . Originally I wanted to print them as 💩, but then quickly switched to to make it look more professional.

Kevin Buzzard (Jul 08 2020 at 14:33):

/me puts his glasses on

Kevin Buzzard (Jul 08 2020 at 14:34):

eew


Last updated: Dec 20 2023 at 11:08 UTC