Zulip Chat Archive

Stream: general

Topic: Warning in project version


Filippo A. E. Nuccio (Jun 05 2024 at 12:25):

I have updated my LocalClassFieldTheory project and now I see

Opened project is using a Lean 4 version (4.0.0-nightly-2023-02-04) from before the first Lean 4 stable release (4.0.0).
Pre-stable Lean 4 versions are increasingly less supported, so please consider updating to a newer Lean 4 version.

I would certainly want to update to a new Lean 4 version, but my toolchain says

leanprover/lean4:v4.8.0-rc2

so I am not sure what I am supposed to do.

Filippo A. E. Nuccio (Jun 05 2024 at 12:27):

Also, since updating to 4..8.0-rc2 my lean server crashes very often, without noticeable trouble (I simply relaunch it) but it seems a bad sign...

Patrick Massot (Jun 05 2024 at 12:31):

Are there any error messages when it crashes?

Filippo A. E. Nuccio (Jun 05 2024 at 12:32):

Yes, let me reopen it and copy-paste

Filippo A. E. Nuccio (Jun 05 2024 at 12:34):

OK, now I have launched it and can work well... Let's wait 3 mins

Filippo A. E. Nuccio (Jun 05 2024 at 12:35):

(as usual, you're never as fit as when you enter the doctor's room... :fever: )

Filippo A. E. Nuccio (Jun 05 2024 at 12:36):

OK, now I got the

Opened project is using a Lean 4 version (4.0.0-nightly-2023-02-04) from before the first Lean 4 stable release (4.0.0). Pre-stable Lean 4 versions are increasingly less supported, so please consider updating to a newer Lean 4 version.

Filippo A. E. Nuccio (Jun 05 2024 at 12:36):

But no crash "yet"

Marc Huisinga (Jun 05 2024 at 12:37):

Filippo A. E. Nuccio said:

OK, now I got the

Opened project is using a Lean 4 version (4.0.0-nightly-2023-02-04) from before the first Lean 4 stable release (4.0.0). Pre-stable Lean 4 versions are increasingly less supported, so please consider updating to a newer Lean 4 version.

What's the setup information output in the file you are looking at? (Forall menu > Show setup information)

Filippo A. E. Nuccio (Jun 05 2024 at 12:38):

Operating system: Windows_NT (release: 10.0.22631)
CPU architecture: x64
CPU model: 8 x 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
Available RAM: 34.19 GB

Curl installed: true
Git installed: true
Elan: Reasonably up-to-date (version: 3.1.1)
Lean: Reasonably up-to-date (version: 4.8.0-rc2)
Project: Valid Lean project (path: c:\Users\nf51454h\Desktop\Lean\LocalClassFieldTheory)


Elan toolchains:

installed toolchains
--------------------

stable
leanprover/lean4:nightly-2023-02-04 (default)
leanprover/lean4:v4.8.0-rc2


active toolchain
----------------


leanprover/lean4:v4.8.0-rc2 (overridden by '\\?\C:\Users\nf51454h\Desktop\Lean\LocalClassFieldTheory\lean-toolchain')

Lean (version 4.8.0-rc2, x86_64-w64-windows-gnu, commit 873ef2d894af, Release)

Filippo A. E. Nuccio (Jun 05 2024 at 12:39):

Yes, now it goes:

Lean Server has stopped unexpectedly

Filippo A. E. Nuccio (Jun 05 2024 at 12:40):

The Lean 4 server crashed 1 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Filippo A. E. Nuccio (Jun 05 2024 at 12:40):

And if I look at the output

Filippo A. E. Nuccio (Jun 05 2024 at 12:40):

Watchdog error: cannot find open document 'file:///c%3A/Users/nf51454h/.elan/toolchains/leanprover--lean4---v4.8.0-rc2/src/lean/Lean/Elab/Declaration.lean'

[Error - 2:39:22 PM] The Lean 4 server crashed 1 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Filippo A. E. Nuccio (Jun 05 2024 at 12:41):

(Beside the trouble per se the fact that it crashes after 9 minutes is beyond my paygrade. I thought the idea of getting tired while jogging was a human feature...)

Marc Huisinga (Jun 05 2024 at 12:42):

Did you open that file at some point (e.g. by using go-to-definition)?

Filippo A. E. Nuccio (Jun 05 2024 at 12:43):

I opened another file (inside Mathlib) but almost immediately, certainly not after 9 minutes.

Marc Huisinga (Jun 05 2024 at 12:44):

One thing you can try is to set elan default leanprover/lean4:v4.8.0-rc2

Filippo A. E. Nuccio (Jun 05 2024 at 12:44):

Let me try; and the probably close-reopen VSCode?

Marc Huisinga (Jun 05 2024 at 12:44):

Yes

Filippo A. E. Nuccio (Jun 05 2024 at 12:45):

OK, done. Now I fear I have to wait 9 more minutes for the next crash... :hourglass_done:

Marc Huisinga (Jun 05 2024 at 12:45):

Unfortunately, when opening core files, Lean uses the default toolchain because the core source files don't have a lean-toolchain file themselves (cc @Sebastian Ullrich). This means that go to definition into core can break things.

Filippo A. E. Nuccio (Jun 05 2024 at 12:45):

But I went to a declaration in Mathlib.DedekindDomain.Ideal...

Filippo A. E. Nuccio (Jun 05 2024 at 12:46):

OK, I still get the warning

Opened project is using a Lean 4 version (4.0.0-nightly-2023-02-04) from before the first Lean 4 stable release (4.0.0).
Pre-stable Lean 4 versions are increasingly less supported, so please consider updating to a newer Lean 4 version.

Filippo A. E. Nuccio (Jun 05 2024 at 12:46):

and beyond having a (seemingly) updated toolchain I do not know what to do

Marc Huisinga (Jun 05 2024 at 12:46):

Does elan show now designate the correct toolchain as default?

Filippo A. E. Nuccio (Jun 05 2024 at 12:47):

Ah no

Filippo A. E. Nuccio (Jun 05 2024 at 12:47):

It still gives the old one

Filippo A. E. Nuccio (Jun 05 2024 at 12:48):

Yes, now it is ok

Filippo A. E. Nuccio (Jun 05 2024 at 12:48):

$ elan show
installed toolchains


stable
leanprover/lean4:nightly-2023-02-04
leanprover/lean4:v4.8.0-rc2 (default)

active toolchain


leanprover/lean4:v4.8.0-rc2 (overridden by '\\?\C:\Users\nf51454h\Desktop\Lean\LocalClassFieldTheory\lean-toolchain')
Lean (version 4.8.0-rc2, x86_64-w64-windows-gnu, commit 873ef2d894af, Release)

Filippo A. E. Nuccio (Jun 05 2024 at 12:48):

Let's try again with the project

Filippo A. E. Nuccio (Jun 05 2024 at 12:49):

OK, while it launches: I would be very happy to uninstall the old one, but I have the feeling that each time I will create a new project I would re-install it due to the instructions here. Am I wrong?

Marc Huisinga (Jun 05 2024 at 12:51):

The instructions at that documentation page now seem to refer to a more recent nightly

Filippo A. E. Nuccio (Jun 05 2024 at 12:52):

Oh, you're right.

Filippo A. E. Nuccio (Jun 05 2024 at 12:52):

OK, so I will happily uninstall that old toolchain.

Filippo A. E. Nuccio (Jun 05 2024 at 12:52):

OK, now I am not getting the warning any more, let's see if it crashed in a while.

Filippo A. E. Nuccio (Jun 05 2024 at 12:54):

Yep, crashed again!

Watchdog error: cannot find open document 'file:///c%3A/Users/nf51454h/.elan/toolchains/leanprover--lean4---v4.8.0-rc2/src/lean/Lean/Elab/Declaration.lean'

[Error - 2:54:03 PM] The Lean 4 server crashed 1 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Filippo A. E. Nuccio (Jun 05 2024 at 12:55):

And again, I was just fighting with a rw inside my file and had the Mathlib.DedekindDomain.Ideal open, where the declaration I was fighting against is.

Filippo A. E. Nuccio (Jun 05 2024 at 12:56):

And once more, if I simply ignore this "crash" I can keep working.

Marc Huisinga (Jun 05 2024 at 12:57):

Ah, I have an idea for one more thing to narrow down the source of this issue. Could you try downgrading your Lean 4 extension version to 0.0.155? (Extensions > Right click on Lean 4 extension > Install another version)

Filippo A. E. Nuccio (Jun 05 2024 at 12:58):

Sure, let me try.

Filippo A. E. Nuccio (Jun 05 2024 at 12:59):

OK, done and restarted; I have also disabled the auto-update

Marc Huisinga (Jun 05 2024 at 12:59):

(VS Code sometimes opens ghost documents in the background for various features. I had to touch our logic for filtering these documents in fixing https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/VSCODE.20outline.20mode.20not.20working.20in.20imports/near/442000461, so there's a chance that I overlooked something)

Filippo A. E. Nuccio (Jun 05 2024 at 13:00):

Well, we're ready for another trial. I will keep fighting my rw and if in 5/7 minutes nothing happens is seems like a good sign.

Filippo A. E. Nuccio (Jun 05 2024 at 13:07):

... still good :silence:

Filippo A. E. Nuccio (Jun 05 2024 at 13:13):

I am inclined to believe that you found the problem! :tada:

Marc Huisinga (Jun 05 2024 at 13:16):

Well, it's still not really clear what the cause is and unfortunately I can't reproduce it myself. I have a suspicion though, so let's see if I can fix this regardless without a reproducer.

Filippo A. E. Nuccio (Jun 05 2024 at 13:17):

Of course if you need/want to discuss by zoom to see/play with my PC, that's fine.

Notification Bot (Jun 05 2024 at 13:47):

Filippo A. E. Nuccio has marked this topic as resolved.

Marc Huisinga (Jun 05 2024 at 14:27):

I made an attempt at fixing this and the attempted fix is in a pre-release version (0.0.158) of the VS Code extension. You can install it by selecting the extension and then clicking "Switch to pre-release" in the page that opens.

Notification Bot (Jun 05 2024 at 14:28):

Filippo A. E. Nuccio has marked this topic as unresolved.

Filippo A. E. Nuccio (Jun 05 2024 at 14:28):

OK, let me check.

Filippo A. E. Nuccio (Jun 05 2024 at 14:30):

I still do not have it

Notification Bot (Jun 05 2024 at 14:31):

Filippo A. E. Nuccio has marked this topic as unresolved.

Marc Huisinga (Jun 05 2024 at 15:58):

If the issue you encountered didn't come up with 0.0.158 anymore, I'll release it tomorrow.

Filippo A. E. Nuccio (Jun 05 2024 at 16:22):

Well, as a matter of fact I have not been able to download 0.0.158, I still only have 0.0.157 in the top of my list and no "pre-release" button in the extension page.... :sad:

Marc Huisinga (Jun 05 2024 at 16:24):

Filippo A. E. Nuccio said:

Well, as a matter of fact I have not been able to download 0.0.158, I still only have 0.0.157 in the top of my list and no "pre-release" button in the extension page.... :sad:

This is what it looks like for me:
image.png

Marc Huisinga (Jun 05 2024 at 16:26):

Perhaps you need to update to 0.0.157 first for the button to show up?

Filippo A. E. Nuccio (Jun 05 2024 at 16:28):

Let me try

Filippo A. E. Nuccio (Jun 05 2024 at 16:29):

Yes indeed, good point.

Filippo A. E. Nuccio (Jun 05 2024 at 16:29):

I have just installed 0.0.158 then, I will work on it half an hour, say, and will report back if I have problems.

Filippo A. E. Nuccio (Jun 05 2024 at 16:53):

Well, for the time being everything still OK. I will soon need to leave, but I have not seen any problem as those before. Thanks!


Last updated: May 02 2025 at 03:31 UTC