pp status, which shows the project, versions and workspace ProofPod
detected, and add --verbose to any command to see each step it takes.
Performance
The first command after a pause is slower
A sandbox that has been idle for more than two minutes is shut down. The next command starts a new one, which has to read Mathlib’s files for the first time. Measured on a small project that imports all of Mathlib (Lean 4.36, default 4 cores):lake build takes ten seconds even when nothing changed
Before compiling, Lake checks that every module your project depends on is up
to date. With Mathlib that is about 18,000 build records, and reading them
through the sandbox’s filesystem takes about ten seconds. The
same check takes two or three seconds on a local SSD.
This overhead is fixed, so it disappears into any build that does real work.
For a tight edit-check loop on one file, skip the build:
pp --cpu 16 lake build.
The first use of a version takes minutes
That is the environment being built. It happens once per Lean and Mathlib version, for everyone.pp envs lists what is already built.
Errors
You are not signed in. Run pp login.
Run pp login, or set PROOFPOD_TOKEN. If you are signed in on one machine
and not another, each machine needs its own login.
Another command is still running in this workspace with different resources or versions.
A workspace has one sandbox, and its limits are fixed while a command runs.
Wait for the running command, stop it with pp cancel RUN_ID (pp runs lists
them), or use the same limits for both.
out of memory: the command exceeded 16 GiB
Raise --memory. It is a ceiling, not a purchase. Mathlib’s mapped libraries
do not count toward it, so this is your proofs’ own allocation.
The sandbox stopped unexpectedly while running this command.
Almost always a very fast memory blow-up that outran the limit check. Retry
with a larger --memory. If it happens with modest memory use, retry once; a
sandbox can be lost to a hardware fault.
Mathlib … is built for Lean … but this project uses …
Your lean-toolchain and the Mathlib commit in lake-manifest.json do not
agree. Lake would rebuild Mathlib from source locally too. Run pp lake update
to bring them back in line.
Mathlib is being compiled from source
Prebuilt Mathlib is used only when the commit inlake-manifest.json is an
upstream Mathlib commit built for your Lean version. Check, in this order:
pp statusshows a Mathlib version from lake-manifest.json. If it says from lakefile (no manifest yet), runpp lake updateand commit the manifest.- Your Mathlib is from
leanprover-community/mathlib4, not a fork. - Your
lean-toolchainmatches the one in that Mathlib commit.
A local path dependency is not found
Dependencies declared withrequire foo from "../foo" are synced when they
appear in lake-manifest.json with "type": "path". Run pp lake update once
so the manifest lists them.
A file I generated in the cloud did not come back
- Files matched by
.gitignoreare not synced in either direction. - Nothing under
.lake/is ever synced. - Files over 64 MiB are skipped with a warning.
--detachand--no-sync-backdisable syncing back.
My program received no input
Standard input is only forwarded when you ask for it withpp --stdin (or
-i), or when the command is lean --stdin. See
Standard input for why.
… changed both here and in the cloud; kept your local version
You edited a file while a command that also changed it was running. Your edit
won. Re-run the command to regenerate its version on top of your edit.
Your editor
The Lean language server runs on your machine (lake serve and lean --server
are local commands), so your editor needs a local toolchain and, for a Mathlib
project, a local Mathlib cache: