From e8acf86d35420857736f8d9721e501a31d7411ad Mon Sep 17 00:00:00 2001 From: psong Date: Sat, 20 Jun 2026 15:06:08 -0700 Subject: [PATCH 1/2] Bump everything to latest --- lake-manifest.json | 8 ++++---- lakefile.lean | 4 ++-- lean-toolchain | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lake-manifest.json b/lake-manifest.json index e1e5e90..45c1864 100644 --- a/lake-manifest.json +++ b/lake-manifest.json @@ -5,20 +5,20 @@ "type": "git", "subDir": null, "scope": "", - "rev": "7152850e7b216a0d409701617721b6e469d34bf6", + "rev": "b5b9e2bb45ce91e4bc44eaa738c3a8910404ab82", "name": "aesop", "manifestFile": "lake-manifest.json", - "inputRev": "7152850e7b216a0d409701617721b6e469d34bf6", + "inputRev": "master", "inherited": false, "configFile": "lakefile.toml"}, {"url": "https://github.com/leanprover-community/batteries.git", "type": "git", "subDir": null, "scope": "", - "rev": "32dc18cde3684679f3c003de608743b57498c56f", + "rev": "e535e4feb0aa360e59e7adf4837b91ffbfb8c943", "name": "batteries", "manifestFile": "lake-manifest.json", - "inputRev": "32dc18cde3684679f3c003de608743b57498c56f", + "inputRev": "main", "inherited": false, "configFile": "lakefile.toml"}], "name": "LeanCopilot", diff --git a/lakefile.lean b/lakefile.lean index ecd94fe..230b6c0 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" @ "32dc18cde3684679f3c003de608743b57498c56f" -require aesop from git "https://github.com/leanprover-community/aesop" @ "7152850e7b216a0d409701617721b6e469d34bf6" +require batteries from git "https://github.com/leanprover-community/batteries.git" @ "main" +require aesop from git "https://github.com/leanprover-community/aesop" @ "master" 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 5a8f161..63f51ea 100644 --- a/lean-toolchain +++ b/lean-toolchain @@ -1 +1 @@ -leanprover/lean4:v4.30.0 \ No newline at end of file +leanprover/lean4:v4.32.0-rc1 \ No newline at end of file From 8a83359c5940e4564e18d11d1462c248363d022e Mon Sep 17 00:00:00 2001 From: psong Date: Sat, 20 Jun 2026 15:16:01 -0700 Subject: [PATCH 2/2] fix: Support mac num proc calculation --- lakefile.lean | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lakefile.lean b/lakefile.lean index 230b6c0..51c15df 100644 --- a/lakefile.lean +++ b/lakefile.lean @@ -28,9 +28,14 @@ deriving Inhabited, BEq def nproc : IO Nat := do - let cmd := if getOS! == .windows then "cmd" else "nproc" - let args := if getOS! == .windows then #["/c echo %NUMBER_OF_PROCESSORS%"] else #[] + let (cmd, args) := + match getOS! with + | .windows => ("cmd", #["/c echo %NUMBER_OF_PROCESSORS%"]) + | .macos => ("sysctl", #["-n", "hw.ncpu"]) + | .linux => ("nproc", #[]) let out ← IO.Process.output {cmd := cmd, args := args, stdin := .null} + if out.exitCode != 0 then + return 4 return out.stdout.trimAscii.toNat!