Zulip Chat Archive
Stream: general
Topic: revert mathlib version in repo
Ashvni Narayanan (Feb 04 2023 at 16:15):
(deleted)
Ashvni Narayanan (Feb 04 2023 at 16:28):
Hi, I have a repo that is dependent on mathlib (working in Lean 3). I used leanproject new to build it, so it is the newest version of mathlib. I want to revert to a previous version of mathlib (from 3.50.3 to 3.42.1). I presume I need to use git revert, but I don't know exactly how.
Any help would be appreciated, thank you!
Eric Wieser (Feb 04 2023 at 16:29):
You can just edit the leanproject.toml
, then run leanpkg configure
and leanproject get-mathlib-cache
Notification Bot (Feb 04 2023 at 16:29):
Ashvni Narayanan has marked this topic as resolved.
Eric Wieser (Feb 04 2023 at 16:29):
If that still doesn't work, then delete the _targets
directory and try the last two steps again
Notification Bot (Feb 04 2023 at 16:30):
Ashvni Narayanan has marked this topic as unresolved.
Eric Wieser (Feb 04 2023 at 16:30):
git revert
is not relevant here
Ashvni Narayanan (Feb 04 2023 at 16:33):
Eric Wieser said:
You can just edit the
leanproject.toml
, then runleanpkg configure
andleanproject get-mathlib-cache
Thank you! There are two leanproject.toml
files (one in the _target
folder). Which one should I edit?
Eric Wieser (Feb 04 2023 at 16:34):
The one in the root
Eric Wieser (Feb 04 2023 at 16:34):
The _target
folder is at best a cache; you can always safely delete it as long as you have an internet connection and github still exists, as it can be regenerated with leanpkg
/leanproject
Eric Wieser (Feb 04 2023 at 16:42):
Oh, you'll need to make sure the mathlib version is consistent with the lean version
Eric Wieser (Feb 04 2023 at 16:42):
I want to revert to a previous version of mathlib (from 3.50.3 to 3.42.1)
These are Lean versions not mathlib versions
Ashvni Narayanan (Feb 04 2023 at 16:46):
It worked, thanks a lot!
Last updated: Dec 20 2023 at 11:08 UTC