From de4b8409d29ccbacb275b4225efd9c4b57426a95 Mon Sep 17 00:00:00 2001 From: psong Date: Mon, 17 Nov 2025 13:54:28 -0800 Subject: [PATCH 1/4] Bump to latest stable Lean version v4.25.0 with deps --- lakefile.lean | 4 ++-- lean-toolchain | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lakefile.lean b/lakefile.lean index b466d88..7216878 100644 --- a/lakefile.lean +++ b/lakefile.lean @@ -422,8 +422,8 @@ extern_lib libleanffi pkg := do buildStaticLib (pkg.sharedLibDir / name) #[ct2O] -require batteries from git "https://github.com/leanprover-community/batteries.git" @ "main" -require aesop from git "https://github.com/leanprover-community/aesop" @ "master" +require batteries from git "https://github.com/leanprover-community/batteries.git" @ "39260e31b7b3f7f05643da95242463b462dc05f1" +require aesop from git "https://github.com/leanprover-community/aesop" @ "26e4c7c0e63eb3e6cce3cf7faba27b8526ea8349" meta if get_config? env = some "dev" then -- dev is so not everyone has to build it require «doc-gen4» from git "https://github.com/leanprover/doc-gen4" @ "main" diff --git a/lean-toolchain b/lean-toolchain index 58ae245..1d4c9d4 100644 --- a/lean-toolchain +++ b/lean-toolchain @@ -1 +1 @@ -leanprover/lean4:v4.24.0 \ No newline at end of file +leanprover/lean4:v4.25.0 \ No newline at end of file From 3cdf5e8cabac0a13755a9d6accf3ab991b16b301 Mon Sep 17 00:00:00 2001 From: psong Date: Mon, 17 Nov 2025 14:10:40 -0800 Subject: [PATCH 2/4] Bump dep packages --- lake-manifest.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lake-manifest.json b/lake-manifest.json index 78c1a37..54dbe9f 100644 --- a/lake-manifest.json +++ b/lake-manifest.json @@ -5,20 +5,20 @@ "type": "git", "subDir": null, "scope": "", - "rev": "725ac8cd67acd70a7beaf47c3725e23484c1ef50", + "rev": "26e4c7c0e63eb3e6cce3cf7faba27b8526ea8349", "name": "aesop", "manifestFile": "lake-manifest.json", - "inputRev": "master", + "inputRev": "26e4c7c0e63eb3e6cce3cf7faba27b8526ea8349", "inherited": false, "configFile": "lakefile.toml"}, {"url": "https://github.com/leanprover-community/batteries.git", "type": "git", "subDir": null, "scope": "", - "rev": "8da40b72fece29b7d3fe3d768bac4c8910ce9bee", + "rev": "39260e31b7b3f7f05643da95242463b462dc05f1", "name": "batteries", "manifestFile": "lake-manifest.json", - "inputRev": "main", + "inputRev": "39260e31b7b3f7f05643da95242463b462dc05f1", "inherited": false, "configFile": "lakefile.toml"}], "name": "LeanCopilot", From 973f20b71cf1430c42b6d1e8553b297827c25df7 Mon Sep 17 00:00:00 2001 From: psong Date: Mon, 17 Nov 2025 14:11:03 -0800 Subject: [PATCH 3/4] fix: suggestion style is depracated --- LeanCopilot/Frontend.lean | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LeanCopilot/Frontend.lean b/LeanCopilot/Frontend.lean index b158982..476f465 100644 --- a/LeanCopilot/Frontend.lean +++ b/LeanCopilot/Frontend.lean @@ -30,13 +30,12 @@ def suggestion (tac : String) (msgs : MessageLog := {}) : TacticM Suggestion := let e ← g.withContext do (PrettyPrinter.ppExpr goalType) str := str ++ Format.pretty ("\n⊢ " ++ e) pure (some str) - let style? := if goals.isEmpty then some .success else none let msg? ← msgs.toList.findM? fun m => do pure <| m.severity == MessageSeverity.information && (← m.data.toString).startsWith "Try this: " let suggestion ← match msg? with | some m => pure <| SuggestionText.string (((← m.data.toString).drop 10).takeWhile (· != '\n')) | none => pure <| SuggestionText.string tac - return { suggestion, postInfo?, style? } + return { suggestion, postInfo? } /-- Run a tactic, returning any new messages rather than adding them to the message log. -/ From 97e0684716ae7904bb2b7f87938fd0d21353c7ed Mon Sep 17 00:00:00 2001 From: psong Date: Mon, 17 Nov 2025 14:13:11 -0800 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5df5af2..81b564a 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ moreLinkArgs = ["-L./.lake/packages/LeanCopilot/.lake/build/lib", "-lctranslate2 require LeanCopilot from git "https://github.com/lean-dojo/LeanCopilot.git" @ "LEAN_COPILOT_VERSION" ``` -For stable Lean versions (e.g., `v4.24.0`), set `LEAN_COPILOT_VERSION` to be that version. For the latest unstable Lean versions (e.g., `v4.25.0-rc1`), set `LEAN_COPILOT_VERSION` to `main`. In either case, make sure the version is compatible with other dependencies such as mathlib. If your project uses lakefile.toml instead of lakefile.lean, it should include: +For stable Lean versions (e.g., `v4.25.0`), set `LEAN_COPILOT_VERSION` to be that version. For the latest unstable Lean versions (e.g., `v4.26.0-rc1`), set `LEAN_COPILOT_VERSION` to `main`. In either case, make sure the version is compatible with other dependencies such as mathlib. If your project uses lakefile.toml instead of lakefile.lean, it should include: ```toml [[require]]