You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lake doesn't allow transitive dependencies to use non-default branches? #3167
require mathlib from git "https://github.com/leanprover-community/mathlib4" @ "lean-pr-testing-3159"
and the lakefile in that branch of Mathlib itself says
require std from git "https://github.com/leanprover/std4" @ "lean-pr-testing-3159"
Running lake update there persistently gives the error message:
% lake update
mathlib: cloning https://github.com/leanprover-community/mathlib4 to './.lake/packages/mathlib'
std: cloning https://github.com/leanprover/std4 to './.lake/packages/std'
error: > git checkout --detach c70b9499d9af95eea6c5d7073874b7cf2c715afe # in directory ./.lake/packages/std
error: stderr:
fatal: reference is not a tree: c70b9499d9af95eea6c5d7073874b7cf2c715afe
error: external command `git` exited with code 128
despite c70b9499d9af95eea6c5d7073874b7cf2c715afe being the perfectly good HEAD of the lean-pr-testing-3159 branch at Std.
Did the branch perhaps get deleted when the corresponding std4 PR got merged into the respective nightly-testing branch (leanprover-community/batteries#521)?
To be clear, the branch was on leanprover/std4, not mhuisi/std4.
Activity
digama0 commentedon Jan 12, 2024
It's not a lake bug, if you check out a fresh copy of https://github.com/leanprover/std4 you also won't be able to find
lean-pr-testing-3159. I was able to check this branch out just fine in my local copy of std4, which caused me a lot of confusion, but that's because I have mhuisi's remote, presumably from an earlier PR of theirs. The problem is thatlean-pr-testing-3159is a branch of https://github.com/mhuisi/std4, so you have to use that in mathlib's lakefile.EDIT: Actually it's not on https://github.com/mhuisi/std4 either, and my local
.git/configfor the branch is consistent with this being a leanprover/std4 branch that just got deleted somehow.mhuisi commentedon Jan 12, 2024
Did the branch perhaps get deleted when the corresponding std4 PR got merged into the respective nightly-testing branch (leanprover-community/batteries#521)?
To be clear, the branch was on leanprover/std4, not mhuisi/std4.
kim-em commentedon Jan 12, 2024
Indeed, github says @joehendrix deleted it. I've restored it.
kim-em commentedon Jan 12, 2024
And as
lake updatenow succeeds in thereplrepository, this was a false alarm, and I'll close it.joehendrix commentedon Jan 12, 2024
Sorry, I didn't know about the need to keep them around.
nomeata commentedon Jan 12, 2024
Maybe
lake’s use ofgitcould be made more robust in this respect, by using the idiom shown here: https://stackoverflow.com/a/3489576/946226 (create empty repo, add remote, usegit fetch <REV>). This would download less git data that isn't used, and is likely a bit more robust when people delete branches.@tydeu, did you consider this?
tydeu commentedon Jan 13, 2024
@nomeata No I had not. Sounds like a good idea to me!