Zulip Chat Archive
Stream: mathlib4
Topic: A problem when installing blueprint: automatical upgrading
Nick_adfor (Dec 19 2025 at 14:30):
I added blueprint to my project on v4.26.0-rc2, yet it has something to automatically upgrade to v4.27.0 but I do not want to upgrade since some files were conflict.
lakefile.lean contents:
import Lake
open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
@ "v4.26.0-rc2"
package "ThePolynomialMethod" where
lean_lib "ThePolynomialMethod" where
require checkdecls from git "https://github.com/PatrickMassot/checkdecls.git"
meta if get_config? env = some "dev" then
require «doc-gen4» from git
"https://github.com/leanprover/doc-gen4" @ "main"
Error:
- API duplicate declaration conflicts
error: Batteries/Lean/EStateM.lean:43:16: `EStateM.run_pure` has already been declared
error: Batteries/Lean/Except.lean:55:16: `ExceptT.run_mk` has already been declared
error: Batteries/Lean/System/IO.lean:28:4: `IO.waitAny'` has already been declared
error: Batteries/Control/OptionT.lean:27:16: `OptionT.run_monadMap` has already been declared
- Type class instance synthesis failures
error: Batteries/Data/ByteSlice.lean:55:11: failed to synthesize instance of type class Monad m
error: Batteries/Lean/PersistentHashSet.lean:17:23: invalid `do` notation, expected type is not a monad application
error: Aesop/Util/UnorderedArraySet.lean:98:21: failed to synthesize instance of type class ForIn m (Array α) α
error: Batteries/Data/RBMap/Basic.lean:119:11: failed to synthesize instance of type class Monad m
- File format incompatibility (invalid .olean headers)
error: Batteries/CodeAction/Deprecated.lean:6:0: failed to read file '.../Lean/Elab/BuiltinTerm.olean', invalid header
error: Qq/ForLean/ReduceEval.lean:1:0: failed to read file '.../Lean/Data.olean', invalid header
error: Batteries/CodeAction/Attr.lean:6:0: failed to read file '.../Lean/Elab/Import.olean', invalid header
error: Batteries/Tactic/Case.lean:6:0: failed to read file '.../Lean/Elab/Do.olean', invalid header
- Type mismatches due to String API changes
error: Batteries/Lean/Meta/UnusedNames.lean:55:44: Application type mismatch:
The argument suffix has type String.Slice but is expected to have type Substring.Raw
error: Mathlib/Tactic/Linter/Header.lean:131:21: Application type mismatch:
The argument line.take "Authors: ".length has type String.Slice but is expected to have type String
- Option structure field changes
error: Aesop/Check.lean:20:6: `group` is not a field of structure `Option.Decl`
error: LeanSearchClient/Basic.lean:9:4: `group` is not a field of structure `Lean.Option.Decl`
-
Numerous deprecation warnings
From the output, we can see many warnings about deprecated String APIs, indicating a major refactor of theStringmodule:String.revFindAux→String.Pos.revFind?String.trim→String.trimAsciiString.toSubstring→String.toRawSubstringString.takeRight→String.takeEndString.trimLeft→String.trimAsciiStart
Last updated: Dec 20 2025 at 21:32 UTC