Colim · census of Lean’s official package registry
500 of 758 66%

packages in Lean’s official registry fail to build on the current stable toolchain.proof ↗

52 of the failing packages are recorded only as infrastructure-ambiguous. Independent measurement is in progress; until it completes this figure is an upper bound.proof ↗

Source: Reservoir build history, 116,874 records. Every figure is a SQL query over our ledger; every row links to a public build log.

First automated repair

kmill/render

146★
Lean 4 raytracer
v4.8.0-rc1
Compiler it was pinned to
2 source lines
Plus the toolchain pin
v4.32.1
Now builds on
Main.lean - let mut pixels : Array (Color Float) := Array.mkArray (height * width) Color.black + let mut pixels : Array (Color Float) := Array.replicate (height * width) Color.black lean-toolchain -leanprover/lean4:v4.8.0-rc1 +leanprover/lean4:v4.32.1 old/vec.lean - array := Array.mkArray (Enumerable.card ι) a + array := Array.replicate (Enumerable.card ι) a

Kernel-verified green on our fork — public CI, timestamped.

We audit our own data
11 of 11 independent rebuilds agree with the registry.
We rebuilt a sample ourselves, on the same forced toolchain, rather than trusting the registry’s record. A build that compiles nothing is recorded as inconclusive, never as green.proof ↗
40 ambiguous packages independently re-measured.
Rebuilt in our own CI, upstream cloned read-only at the exact revision. Real errors keep a package in the count; a green build removes it.proof ↗
What is actually broken

How we know each package is failing

Compiler errors in the package’s own code403
Registry build failed before compiling — measurement in progress52
We rebuilt it ourselves — public build log34
We rebuilt it on our own machine11

Why they fail

Uses a name upstream has deprecated228
Types no longer line up178
Identifier removed or renamed upstream155
Proof no longer closes102
Registry could not fetch its build cache92
Structure field removed or renamed90
Name now clashes with upstream79
Required instance no longer found73
Stale build artifacts64

Packages usually fail for several reasons at once, so these do not sum to the total.

Request a repair for a package →