lean4-htt/tests
Joachim Breitner 2075103cd9
fix: show kernel diagnostics even for examples (#9509)
This PR surfaces kernel diagnostics even in `example`.

The problem was that the kernel checking happens asynchronously. We
cannot use `reportDiag` in `addDecl`, which spawns that task, due to the
module hierarchy. For non `example`-declaration, `reportDiag` is called
somewhere else later, but for `example`, the `withoutModifyingEnv` in
`elabMutualDef` hid the kernel diagnostics. (But only the kernel
diagnostics; they are in the `Environment`, while the others are in the
`State`).

I also observed that the `reportDiag` in `elabAsync` (but not in
`elabSync`) duplicated the reporting, so without `elab.Async true` you
get the message twice. To fix this, `reportDiag` now resets the
diagnostics. This should avoid reporting counts twice in general (at
least within a linear use of the state).

---------

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2025-07-24 09:21:47 +00:00
..
bench chore: benchmark using USE_LAKE (#9361) 2025-07-17 18:44:29 +00:00
compiler
elabissues
ir
lean fix: show kernel diagnostics even for examples (#9509) 2025-07-24 09:21:47 +00:00
pkg perf: do not export specializations (#9465) 2025-07-23 13:12:15 +00:00
playground
plugin
simpperf
.gitignore
common.sh
lakefile.toml
lean-toolchain