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..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! @@ -422,8 +427,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