Zulip Chat Archive
Stream: Polynomial Freiman-Ruzsa conjecture
Topic: Mathlib bump
Scott Morrison (Dec 05 2023 at 04:29):
I reduced the changes to the lake-manifest.json
in https://github.com/teorth/pfr/pull/129/files (no functional change from my original PR, just making sure json blocks aren't unnecessarily reordered).
It compiles fine with lake build
. Is there anything else to be concerned about? (If so, how about we check it in CI? :-)
Terence Tao (Dec 05 2023 at 22:59):
Scott Morrison said:
I reduced the changes to the
lake-manifest.json
in https://github.com/teorth/pfr/pull/129/files (no functional change from my original PR, just making sure json blocks aren't unnecessarily reordered).It compiles fine with
lake build
. Is there anything else to be concerned about? (If so, how about we check it in CI? :-)
Hmm, as with previous bumps it caused my local version of Lean to recompile all of Mathlib, but that's fine. (I understand that I could presumably save the hour or two of building by doing lake cache get
or something, but I'm not touching Lean any time soon, so I'm happy to just let it run. Still, I'm glad we waited until the project got over the finish line before approving the Mathlib rollover.)
Yaël Dillies (Dec 08 2023 at 20:28):
Now that we're reaching the "upstreaming" part of the project, please everyone expect mathlib bumps to become quite frequent!
Yaël Dillies (Dec 08 2023 at 20:29):
I would like to remind you that whenever you pull a bump PR to your local copy, you should run lake exe cache get
right after. Importantly, do not click Rebuild imports
or Refresh file dependencies
or Restart file
until you've run lake exe cache get
.
Kevin Buzzard (Dec 08 2023 at 22:12):
So "before you upgrade, close VS Code, and don't open it again until after lake exe cache get
". I usually type lake build
as well before opening VS Code.
Eric Wieser (Dec 08 2023 at 22:20):
I don't think closing vscode is necessary any more
Eric Wieser (Dec 08 2023 at 22:20):
You just have to not click the popup that says "restart file" until you are actually ready to run Lean against your cache
Adam Topaz (Dec 08 2023 at 22:22):
crtl+shift+x is probably my most frequently used shortcut nowadays
Kevin Buzzard (Dec 09 2023 at 08:06):
For me closing and opening VS Code is cheap. I do it every time I fiddle on command line. Looking forward to a world where I never have to touch command line...
Eric Rodriguez (Dec 09 2023 at 12:26):
Developer: reload window is closing vscode but faster :)
Eric Wieser (Dec 09 2023 at 17:11):
Not clicking "restart file" is (in this case) "Developer: reload window" but faster :)
Scott Morrison (Dec 09 2023 at 17:51):
@Kevin Buzzard, what are the major things you're still doing on the command line?
- Restart file (via ctrl-shift-x) deals with out of date imports
- Under the \forall menu, selecting "Project Actions" then "Fetch Mathlib Build Cache" achieves the same as
lake exe cache get
- "Developer: reload window" resolves many "how did I get into this weird state" problems.
If you're keen on a future of not needing the command line, I'd recommend you try using these as much as possible, and report back where the pain points are, or conditions when you still need the command line.
Scott Morrison (Dec 09 2023 at 17:51):
(this is saying the command-line-free future might already be here... in my demo talk on tuesday I installed Lean during the talk, and didn't touch a command line.)
Yaël Dillies (Dec 10 2023 at 21:02):
Heads up that I just bumped mathlib an hour ago.
Yaël Dillies (Dec 13 2023 at 08:45):
And bumped again just now.
Terence Tao (Dec 13 2023 at 10:20):
Yaël Dillies said:
And bumped again just now.
Just a headsup: as part of the entropy refactoring I've had to add lemmas to PFR/Mathlib/MeasureTheory/Integral/Bochner.lean , PFR/Mathlib/MeasureTheory/Integral/Lebesgue.lean ,
PFR/Mathlib/MeasureTheory/Measure/Dirac.lean , PFR/Mathlib/MeasureTheory/Measure/NullMeasurable.lean , and PFR/Mathlib/Probability/Kernel/Disintegration.lean (mostly along the lines of replacing finiteness hypotheses with countability hypotheses).
Terence Tao (Dec 13 2023 at 16:32):
Oof, I just discovered that updating Mathlib at the main branch causes other branches to want to update too. Now Lean is rebuilding Mathlib in the entropy refactoring branch, I hope this doesn't break too many more things
Eric Wieser (Dec 13 2023 at 16:33):
If you switch branch between different mathlib versions, you need to run lake exe cache get
again
Eric Wieser (Dec 13 2023 at 16:33):
(it should use an offline cache if you were previously working on that version, but you still have to tell it to copy the files from the cache)
Terence Tao (Dec 13 2023 at 16:34):
Is there a way to merge changes in the main branch with changes in a refactoring branch without pushing those changes back into the main branch?
Eric Wieser (Dec 13 2023 at 16:34):
From the refactor branch, you can git merge the_main_branch
Eric Wieser (Dec 13 2023 at 16:34):
(which may be either main
or master
for your project, I don't know which)
Terence Tao (Dec 13 2023 at 16:35):
The refactor branch is currently building Mathlib files (554/1698 so far). Would it be safe to cancel this, close VSCode, run lake exe cache get
and git merge master
, and reopen VSCode?
Yaël Dillies (Dec 13 2023 at 16:36):
Yes, absolutely.
Yaël Dillies (Dec 13 2023 at 16:36):
Except you should git merge master
then run lake exe cache get
.
Terence Tao (Dec 13 2023 at 16:37):
Also: if I have checked out the refactor branch in VScode and then close VScode and open up a separate command line, will git still know that I am in that branch?
Eric Wieser (Dec 13 2023 at 16:37):
The knowledge about which branch you are in is stored in the filesystem (in the .git
folder)
Terence Tao (Dec 13 2023 at 16:38):
ok. Trying it now :fingers_crossed:
Terence Tao (Dec 13 2023 at 16:38):
Oh crap there are merge conflicts
Yaël Dillies (Dec 13 2023 at 16:42):
Sorry :frown:
Mauricio Collares (Dec 13 2023 at 16:44):
git push
will still sync your most recent commits (pre merge) with GitHub in case you haven't done so already
Mauricio Collares (Dec 13 2023 at 16:44):
Seems like the newest commit is quite recent, though
Terence Tao (Dec 13 2023 at 16:51):
Ugh Measure.lean is going to be a mess for a while now
Mauricio Collares (Dec 13 2023 at 16:52):
You can also git merge --abort
if you'd rather undo it all and deal with it later
Mauricio Collares (Dec 13 2023 at 16:53):
(you'll lose any merging work you might have done, though)
Terence Tao (Dec 13 2023 at 16:58):
Actually it only created three errors in the file, hopefully I can fix them all manually.
Terence Tao (Dec 13 2023 at 16:58):
I was expecting an ocean of red
Terence Tao (Dec 13 2023 at 16:59):
Have to attend to other things right now, but hopefully this was only a speed bump.
Terence Tao (Dec 13 2023 at 20:36):
OK Measure.lean is repaired. Refactoring is back on track!
Yaël Dillies (Dec 18 2023 at 08:14):
Bumped again!
Last updated: Dec 20 2023 at 11:08 UTC