Skip to content

Commit

Permalink
chore: compatibility shims for Lake modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen committed May 14, 2024
1 parent f2b840b commit df7ad36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- "4.5.0"
- "4.6.0"
- "4.7.0"
- "nightly-2024-04-07"
- "4.8.0-rc1"
platform:
- os: ubuntu-latest
installer: |
Expand Down
12 changes: 12 additions & 0 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ lean_exe «subverso-extract» where
root := `Extract
supportInterpreter := true

-- Compatibility shims for older Lake (where logging was manual) and
-- newer Lake (where it isn't). Necessary from Lean 4.8.0 and up.
section
open Lean Elab Command
#eval show CommandElabM Unit from do
let env ← getEnv
if !env.contains `Lake.logStep then
elabCommand <| ← `(def $(mkIdent `logStep) [Pure $(mkIdent `m)] (message : String) : $(mkIdent `m) Unit := pure ())
if !env.contains `Lake.logInfo then
elabCommand <| ← `(def $(mkIdent `logInfo) [Pure $(mkIdent `m)] (message : String) : $(mkIdent `m) Unit := pure ())
end

module_facet examples mod : FilePath := do
let ws ← getWorkspace
let some extract ← findLeanExe? `«subverso-extract»
Expand Down

0 comments on commit df7ad36

Please sign in to comment.