fix: we want to catch runtime exceptions in doc-gen4

main
Henrik Böving 2023-11-18 23:49:28 +01:00
parent d70b47c9af
commit e966ab8523
3 changed files with 5 additions and 7 deletions

View File

@ -33,6 +33,7 @@ def load (task : Process.AnalyzeTask) : IO (Process.AnalyzerResult × Hierarchy)
-- TODO: Figure out whether this could cause some bugs
fileName := default,
fileMap := default,
catchRuntimeEx := true,
}
Prod.fst <$> Meta.MetaM.toIO (Process.process task) config { env := env } {} {}

View File

@ -123,10 +123,11 @@ def process (task : AnalyzeTask) : MetaM (AnalyzerResult × Hierarchy) := do
try
let config := {
maxHeartbeats := 50000000,
maxHeartbeats := 5000000,
options := ← getOptions,
fileName := ← getFileName,
fileMap := ← getFileMap
fileMap := ← getFileMap,
catchRuntimeEx := true,
}
let analysis ← Prod.fst <$> Meta.MetaM.toIO (DocInfo.ofConstant (name, cinfo)) config { env := env } {} {}
if let some dinfo := analysis then

View File

@ -38,11 +38,7 @@ def DefinitionInfo.ofDefinitionVal (v : DefinitionVal) : MetaM DefinitionInfo :=
let isNonComputable := isNoncomputable (← getEnv) v.name
try
-- Temporary workaround until
-- https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/maxRecDepth.20in.20getEqnsFor.3F/near/402917295
-- is adddressed
let eqs? : Option (Array Name) := none
-- let eqs? ← getEqnsFor? v.name
let eqs? ← getEqnsFor? v.name
match eqs? with
| some eqs =>