fix: we want to catch runtime exceptions in doc-gen4
parent
d70b47c9af
commit
e966ab8523
|
@ -33,6 +33,7 @@ def load (task : Process.AnalyzeTask) : IO (Process.AnalyzerResult × Hierarchy)
|
||||||
-- TODO: Figure out whether this could cause some bugs
|
-- TODO: Figure out whether this could cause some bugs
|
||||||
fileName := default,
|
fileName := default,
|
||||||
fileMap := default,
|
fileMap := default,
|
||||||
|
catchRuntimeEx := true,
|
||||||
}
|
}
|
||||||
|
|
||||||
Prod.fst <$> Meta.MetaM.toIO (Process.process task) config { env := env } {} {}
|
Prod.fst <$> Meta.MetaM.toIO (Process.process task) config { env := env } {} {}
|
||||||
|
|
|
@ -123,10 +123,11 @@ def process (task : AnalyzeTask) : MetaM (AnalyzerResult × Hierarchy) := do
|
||||||
|
|
||||||
try
|
try
|
||||||
let config := {
|
let config := {
|
||||||
maxHeartbeats := 50000000,
|
maxHeartbeats := 5000000,
|
||||||
options := ← getOptions,
|
options := ← getOptions,
|
||||||
fileName := ← getFileName,
|
fileName := ← getFileName,
|
||||||
fileMap := ← getFileMap
|
fileMap := ← getFileMap,
|
||||||
|
catchRuntimeEx := true,
|
||||||
}
|
}
|
||||||
let analysis ← Prod.fst <$> Meta.MetaM.toIO (DocInfo.ofConstant (name, cinfo)) config { env := env } {} {}
|
let analysis ← Prod.fst <$> Meta.MetaM.toIO (DocInfo.ofConstant (name, cinfo)) config { env := env } {} {}
|
||||||
if let some dinfo := analysis then
|
if let some dinfo := analysis then
|
||||||
|
|
|
@ -38,11 +38,7 @@ def DefinitionInfo.ofDefinitionVal (v : DefinitionVal) : MetaM DefinitionInfo :=
|
||||||
let isNonComputable := isNoncomputable (← getEnv) v.name
|
let isNonComputable := isNoncomputable (← getEnv) v.name
|
||||||
|
|
||||||
try
|
try
|
||||||
-- Temporary workaround until
|
let eqs? ← getEqnsFor? v.name
|
||||||
-- 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
|
|
||||||
|
|
||||||
match eqs? with
|
match eqs? with
|
||||||
| some eqs =>
|
| some eqs =>
|
||||||
|
|
Loading…
Reference in New Issue