Skip to content

Commit

Permalink
Merge pull request #46 from leanprover-community/bump_toolchain_to_v4…
Browse files Browse the repository at this point in the history
….15.0-rc1

chore: update toolchain to v4.15.0-rc1
  • Loading branch information
kim-em authored Dec 2, 2024
2 parents 519e509 + 7943a45 commit ed3b856
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
2 changes: 0 additions & 2 deletions ImportGraph/Gexf.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Authors: Jon Eugster
-/

import Lean
import Batteries.Lean.NameMap
import Batteries.Tactic.OpenPrivate

open Lean

Expand Down
1 change: 0 additions & 1 deletion ImportGraph/Imports.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/
import Lean
import Batteries.Lean.NameMap
import ImportGraph.RequiredModules

/-!
Expand Down
4 changes: 2 additions & 2 deletions ImportGraph/RequiredModules.lean
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ partial def Environment.transitivelyRequiredModules' (env : Environment) (module
if verbose then
IO.println s!"Processing module {m}"
let mut r : BitVec N := 0
for n in env.header.moduleData[(env.header.moduleNames.getIdx? m).getD 0]!.constNames do
for n in env.header.moduleData[((env.header.moduleNames.indexOf? m).map Fin.val).getD 0]!.constNames do
if ! n.isInternal then
-- This is messy: Mathlib is big enough that writing a recursive function causes a stack overflow.
-- So we use an explicit stack instead. We visit each constant twice:
Expand Down Expand Up @@ -162,7 +162,7 @@ partial def Environment.transitivelyRequiredModules' (env : Environment) (module
return result
where
toBitVec {N : Nat} (s : NameSet) : BitVec N :=
s.fold (init := 0) (fun b n => b ||| BitVec.twoPow _ ((env.header.moduleNames.getIdx? n).getD 0))
s.fold (init := 0) (fun b n => b ||| BitVec.twoPow _ (((env.header.moduleNames.indexOf? n).map Fin.val).getD 0))
toNameSet {N : Nat} (b : BitVec N) : NameSet :=
env.header.moduleNames.zipWithIndex.foldl (init := {}) (fun s (n, i) => if b.getLsbD i then s.insert n else s)

Expand Down
1 change: 1 addition & 0 deletions ImportGraphTest/Imports.lean
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ elab "#unused_transitive_imports" names:ident* : command => do

/--
info: Transitively unused imports of Init.System.IO:
Init.Control.StateRef
Init.Control.Reader
-/
#guard_msgs in
Expand Down
18 changes: 9 additions & 9 deletions lake-manifest.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{"version": "1.1.0",
"packagesDir": ".lake/packages",
"packages":
[{"url": "https://github.com/leanprover/lean4-cli",
[{"url": "https://github.com/leanprover-community/batteries",
"type": "git",
"subDir": null,
"scope": "leanprover",
"rev": "726b3c9ad13acca724d4651f14afc4804a7b0e4d",
"name": "Cli",
"scope": "leanprover-community",
"rev": "7805acf1864ba1a2e359f86a8f092ccf1438ad83",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inputRev": "v4.15.0-rc1",
"inherited": false,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover-community/batteries",
{"url": "https://github.com/leanprover/lean4-cli",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "76e9ebe4176d29cb9cc89c669ab9f1ce32b33c3d",
"name": "batteries",
"scope": "leanprover",
"rev": "0c8ea32a15a4f74143e4e1e107ba2c412adb90fd",
"name": "Cli",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": false,
Expand Down
2 changes: 1 addition & 1 deletion lakefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rev = "main"
[[require]]
name = "batteries"
scope = "leanprover-community"
rev = "v4.14.0"
rev = "v4.15.0-rc1"

[[lean_lib]]
name = "ImportGraph"
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.14.0
leanprover/lean4:v4.15.0-rc1

0 comments on commit ed3b856

Please sign in to comment.