Zulip Chat Archive
Stream: mathlib4
Topic: external command 'git' exited with code 1
Violeta Hernández (Jan 05 2025 at 20:22):
I suddenly started getting this error and now lean build
doesn't work, what's going on?
image.png
Julian Berman (Jan 05 2025 at 20:55):
lake build --help
doesn't seem to document its options (that seems like a bug worth filing though my vague recollection is I think I have noticed this before and maybe found an existing one).
But just guessing that lake build --verbose
would do something, it appears to -- does doing that tell you at least what git
command was run (and maybe even its output)?
Julian Berman (Jan 05 2025 at 20:55):
(Ah, --verbose
is an option lake
itself is happy with, and is documented in lake --help
, maybe this is what I recall noticing previously.)
Violeta Hernández (Jan 06 2025 at 01:58):
image.png
This is the output of verbose
Violeta Hernández (Jan 06 2025 at 02:01):
Well... I found a random package-lock.json.trace
file, deleted it, and things seem to be normal again...
Kevin Buzzard (Jan 06 2025 at 08:22):
This can happen if a build is cancelled midway through I guess.
Julian Berman (Jan 06 2025 at 18:48):
I just encountered this exact error condition myself when switching between branches...
~/Development/Mathlib4 is a git repository on bhargava-factorial
⊙ lake build --verbose julian@Mini
trace: ././.lake/packages/proofwidgets> git fetch --tags --force origin
info: proofwidgets: checking out revision '07f60e90998dfd6592688a14cd67bd4e384b77b2'
trace: ././.lake/packages/proofwidgets> git checkout --detach 07f60e90998dfd6592688a14cd67bd4e384b77b2 --
trace: stderr:
error: Your local changes to the following files would be overwritten by checkout:
widget/package-lock.json.trace
Please commit your changes or stash them before you switch branches.
Aborting
error: external command 'git' exited with code 1
Julian Berman (Jan 06 2025 at 18:48):
(I don't think anything is to be done? Kevin's probably right, the other branch I was on started building mathlib and I probably killed it by exiting neovim. Just noting in case yet more people run into this.)
Last updated: May 02 2025 at 03:31 UTC