-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trace nodes do not nest correctly in the infoview #6389
Comments
I experimented with a patch along the lines of --- a/src/Lean/Widget/InteractiveDiagnostic.lean
+++ b/src/Lean/Widget/InteractiveDiagnostic.lean
@@ -175,7 +175,9 @@ where
else
pure (.strict (← children.mapM (go nCtx ctx)))
let e := .trace data.cls header data.collapsed nodes
- return .tag (← pushEmbed e) default
+ -- Trace nodes occupy a full line in the widget view, so ensure the formatter considers them
+ -- as such.
+ return .nest 2 <| .tag (← pushEmbed e) "\n" which ensures that the |
As a workaround when using |
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 13, 2025
This PR fixes the indentation of nested traces nodes in the info view. ![image](https://github.com/user-attachments/assets/c13ac2a2-e994-4900-9201-0d86889f6a1b) Fixes #6389
luisacicolini
pushed a commit
to opencompl/lean4
that referenced
this issue
Jan 21, 2025
This PR fixes the indentation of nested traces nodes in the info view. ![image](https://github.com/user-attachments/assets/c13ac2a2-e994-4900-9201-0d86889f6a1b) Fixes leanprover#6389
JovanGerb
pushed a commit
to JovanGerb/lean4
that referenced
this issue
Jan 21, 2025
This PR fixes the indentation of nested traces nodes in the info view. ![image](https://github.com/user-attachments/assets/c13ac2a2-e994-4900-9201-0d86889f6a1b) Fixes leanprover#6389
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
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.Zulip thread
Steps to Reproduce
Run
Expected behavior: Trace nodes are properly nested, as they are on the command line / in
#guard_msgs
: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.
The text was updated successfully, but these errors were encountered: