Zulip Chat Archive

Stream: general

Topic: Errors when using old Lean version


Markus de Medeiros (Jul 27 2025 at 02:59):

I want to use Lean 4.21.0 in a new project with that version of mathlib. In a completely fresh project with the configuration below, lake build works:

lake build output

But when I add import Mathlib to Basic.lean, I get a ton of errors:

Representative error

Here is my lakefile (lean-toolchain isleanprover/lean4:v4.21.0). Am I missing something in my configuration?

lakefile.toml

Kim Morrison (Jul 27 2025 at 03:00):

Change "version" to "rev" in the require block.

Markus de Medeiros (Jul 27 2025 at 03:06):

This did not fix it, and the errors are the same. I even deleted my .lake/ directory and ran lake build again to be sure.

Kim Morrison (Jul 27 2025 at 03:06):

Is there a repository we could clone to observe the problem?

Markus de Medeiros (Jul 27 2025 at 03:07):

It is a completely new project but I could put it on github if that would help

Markus de Medeiros (Jul 27 2025 at 03:08):

https://github.com/markusdemedeiros/IrisLeanMath

Mac Malone (Jul 27 2025 at 03:09):

@Markus de Medeiros Did you run lake update after changing version to rev?

Markus de Medeiros (Jul 27 2025 at 03:10):

I didn't! Thanks, let me try.

Markus de Medeiros (Jul 27 2025 at 03:12):

Yep, it works now, thanks Kim and Mac! I also had to change the rev to "v4.21.0".

Patrick Massot (Jul 27 2025 at 11:57):

Could you please upvote https://github.com/leanprover/lean4/issues/6482 if you think this is a completely unnecessary trap for new users?


Last updated: Dec 20 2025 at 21:32 UTC