lean4-htt/tests/lean/interactive/interactiveTraces.lean
Marc Huisinga dfd3d18530
test: improve language server test coverage (#10574)
This PR significantly improves the test coverage of the language server,
providing at least a single basic test for every request that is used by
the client. It also implements infrastructure for testing all of these
requests, e.g. the ability to run interactive tests in a project context
and refactors the interactive test runner to be more maintainable.
Finally, it also fixes a small bug with the recently implemented unknown
identifier code actions for auto-implicits (#10442) that was discovered
in testing, where the "import all unambiguous unknown identifiers" code
action didn't work correctly on auto-implicit identifiers.
2025-09-30 11:15:03 +00:00

23 lines
683 B
Text

import Lean.Meta.Basic
open Lean.Meta
def traceIt : MetaM Unit := do
Lean.withTraceNode `Meta.debug (fun _ => return m!"root") do
Lean.withTraceNode `Meta.debug (fun _ => return m!"child1") do
trace[Meta.debug] "child11"
trace[Meta.debug] "child12"
trace[Meta.debug] "child13"
Lean.withTraceNode `Meta.debug (fun _ => return m!"child2") do
trace[Meta.debug] "child21"
trace[Meta.debug] "child22"
Lean.withTraceNode `Meta.debug (fun _ => return m!"child3") do
trace[Meta.debug] "child31"
trace[Meta.debug] "child4"
set_option trace.Meta.debug true
#eval traceIt
--^ collectDiagnostics
--^ interactiveDiagnostics:expandTraces