You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The profiler has an option to output the result as a JSON, but this does not seem to respect pretty-printing: the flag trace.profiler.output.pp=true does not seem to do anything, alone or in combination with other pretty-printing options.
notation"ℤ" => Int
theoremfoo {a : ℤ} (h : 0 ≤ a) : 0 < a + 1 := Int.add_pos_of_nonneg_of_pos h Int.zero_lt_one
run the following command
lake env lean -Dtrace.profiler=true -Dtrace.profiler.output="profile.json" -Dtrace.profiler.output.pp=true -Dtrace.profiler.threshold=0 Test.lean
Optionally include other pp options like -Dpp.notation=true or -Dpp.universes=false.
Expected behavior:
Typical step in the JSON output looks like the output of #print foo under the default pretty-printing settings, and is adjustable according to other pretty-printing options (by setting those flags at the command line).
Actual behavior:
Typical step in the JSON output looks like the output of #print foo under the pp.raw pretty-printing setting:
Elab.step: Lean.Parser.Term.app: expected type: LT.lt.{0} Int Int.instLTInt (OfNat.ofNat.{0} Int 0 (instOfNat 0)) (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAdd) _uniq.1362 (OfNat.ofNat.{0} Int 1 (instOfNat 1))), term\n(Term.app `Int.add_pos_of_nonneg_of_pos [`h `Int.zero_lt_one])
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
The profiler has an option to output the result as a JSON, but this does not seem to respect pretty-printing: the flag
trace.profiler.output.pp=true
does not seem to do anything, alone or in combination with other pretty-printing options.Context
Noted by @Kha on Zulip.
Steps to Reproduce
On a file
Test.lean
run the following command
lake env lean -Dtrace.profiler=true -Dtrace.profiler.output="profile.json" -Dtrace.profiler.output.pp=true -Dtrace.profiler.threshold=0 Test.lean
Optionally include other pp options like
-Dpp.notation=true
or-Dpp.universes=false
.Expected behavior:
Typical step in the JSON output looks like the output of
#print foo
under the default pretty-printing settings, and is adjustable according to other pretty-printing options (by setting those flags at the command line).Actual behavior:
Typical step in the JSON output looks like the output of
#print foo
under thepp.raw
pretty-printing setting:Versions
4.12.0, MacOS Sonoma
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: