Zulip Chat Archive
Stream: mathlib4
Topic: Strange CI error: "unknown identifier #0"
Michael Rothgang (Jul 08 2025 at 19:23):
I get a CI error in #26221 that I cannot explain. This error happens both in mathlib CI (example log) and when building locally. It takes the form of 12 warnings on line 2, column 2 of the last file: unknown identifier '#0' --- so on the first meaningful line of the copyright header. Except that the copyright header looks perfectly fine.
Does any of the experts here have any idea what is going on, or how to debug this further? (Whatever the actual cause of the error is, the error message is terrible because it does not help me debug this, at all.)
Matthew Ballard (Jul 08 2025 at 19:29):
I don't think that is an o...
Matthew Ballard (Jul 08 2025 at 19:37):
Nevermind rhs_aux_addZ has an issue. What is MDiff?
Michael Rothgang (Jul 08 2025 at 19:47):
MDiff is a custom elaborator (defined in Mathlib.Geometry.Manifold.Elaborators).
Michael Rothgang (Jul 08 2025 at 19:47):
See this zulip thread for details.
Matthew Ballard (Jul 08 2025 at 19:47):
That is the source of the error.
Michael Rothgang (Jul 08 2025 at 19:52):
Ah, I found the bug. I needed some more syntax soup to make it work. Thanks a lot!
Notification Bot (Jul 08 2025 at 19:52):
Michael Rothgang has marked this topic as resolved.
Damiano Testa (Jul 08 2025 at 19:53):
I think that I've seen unknown identifier #0 appear when there is an expression with a non-bound variable in it.
Notification Bot (Jul 08 2025 at 19:54):
Michael Rothgang has marked this topic as unresolved.
Michael Rothgang (Jul 08 2025 at 19:54):
Can we get a better error message for this, though?
Notification Bot (Jul 08 2025 at 19:55):
Michael Rothgang has marked this topic as unresolved.
Aaron Liu (Jul 08 2025 at 19:56):
Usually I see unexpected bound variable #0 when that happens so I don't know where this error is coming from.
Patrick Massot (Jul 08 2025 at 20:24):
The experimental geometry elaborators definitely need better error reporting. They very probably need withRef stuff. Otherwise Lean doesn’t know where to report errors.
Last updated: Dec 20 2025 at 21:32 UTC