Skip to content

Trace nodes do not nest correctly in the infoview #6389

@eric-wieser

Description

@eric-wieser

Prerequisites

Please put an X between the brackets as you perform the following steps:

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.

Zulip thread

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
image
[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-highWe will work on this issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions