-
Notifications
You must be signed in to change notification settings - Fork 807
Trace nodes do not nest correctly in the infoview #6389
Copy link
Copy link
Closed
Labels
P-highWe will work on this issueWe will work on this issuebugSomething isn't workingSomething isn't working
Description
Prerequisites
Please put an X between the brackets as you perform the following steps:
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
Nested trace nodes are not indented correctly in the widget-based infoview.
They are fine on the command line
Context
This makes set_option trace.Meta.synthInstance true very hard to read the output of.
Steps to Reproduce
Run
import Lean
#eval Lean.logInfo <|
.trace { cls := `foo } m!"Foo" #[
.trace { cls := `bar } m!"Bar 1" #[
.trace { cls := `baz } m!"Baz" #[
m!"Log message"
]
],
.trace { cls := `bar } m!"Bar 2" #[
m!"Log message"
]
]Expected behavior: Trace nodes are properly nested, as they are on the command line / in #guard_msgs:
[foo] Foo
[bar] Bar 1
[baz] Baz
Log message
[bar] Bar 2
Log message
Actual behavior: Infoview shows

[baz] is incorrectly nested, and everything beneath it would also truncate to a two-space indent, no matter how deeply nested.
Versions
4.15.0-rc1
Additional Information
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P-highWe will work on this issueWe will work on this issuebugSomething isn't workingSomething isn't working