From 55dc3caee1b51aaa9efd954ef7798ccc537e6c1d Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Mon, 15 May 2023 11:20:00 +0300 Subject: [PATCH 1/4] add pretty_stackcall(::Base.StackFrame, ::Module) --- src/runner/PlutoRunner.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runner/PlutoRunner.jl b/src/runner/PlutoRunner.jl index 0df26d2050..99413cc636 100644 --- a/src/runner/PlutoRunner.jl +++ b/src/runner/PlutoRunner.jl @@ -1096,6 +1096,10 @@ function pretty_stackcall(frame::Base.StackFrame, linfo::Core.MethodInstance) end end +function pretty_stackcall(frame::Base.StackFrame, linfo::Module) + sprint(Base.show, linfo) +end + "Return a `(String, Any)` tuple containing function output as the second entry." function show_richest_withreturned(context::IOContext, @nospecialize(args)) buffer = IOBuffer(; sizehint=0) From 3432b2b54d4533d726918e28d26bfe4770370b6f Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Mon, 15 May 2023 13:43:33 +0300 Subject: [PATCH 2/4] extend pretty_stackcall to work for Union{Module, Method} --- src/runner/PlutoRunner.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runner/PlutoRunner.jl b/src/runner/PlutoRunner.jl index 99413cc636..e73880bf76 100644 --- a/src/runner/PlutoRunner.jl +++ b/src/runner/PlutoRunner.jl @@ -1096,7 +1096,7 @@ function pretty_stackcall(frame::Base.StackFrame, linfo::Core.MethodInstance) end end -function pretty_stackcall(frame::Base.StackFrame, linfo::Module) +function pretty_stackcall(frame::Base.StackFrame, linfo::Union{Module,Method}) sprint(Base.show, linfo) end From fa6187e95ea9a39eb8403ab54592308009e2b46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A0=CE=B1=CE=BD=CE=B1=CE=B3=CE=B9=CF=8E=CF=84=CE=B7?= =?UTF-8?q?=CF=82=20=CE=93=CE=B5=CF=89=CF=81=CE=B3=CE=B1=CE=BA=CF=8C=CF=80?= =?UTF-8?q?=CE=BF=CF=85=CE=BB=CE=BF=CF=82?= Date: Mon, 15 May 2023 15:16:24 +0300 Subject: [PATCH 3/4] feat: address `Method` case consistently Co-authored-by: Paul Berg --- src/runner/PlutoRunner.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/runner/PlutoRunner.jl b/src/runner/PlutoRunner.jl index e73880bf76..17ba821953 100644 --- a/src/runner/PlutoRunner.jl +++ b/src/runner/PlutoRunner.jl @@ -1096,7 +1096,11 @@ function pretty_stackcall(frame::Base.StackFrame, linfo::Core.MethodInstance) end end -function pretty_stackcall(frame::Base.StackFrame, linfo::Union{Module,Method}) +function pretty_stackcall(frame::Base.StackFrame, linfo::Method) + sprint(Base.show_tuple_as_call, linfo.name, linfo.specTypes) +end + +function pretty_stackcall(frame::Base.StackFrame, linfo::Module) sprint(Base.show, linfo) end From 6e3a38508c99daefafd468c6233fa862b38e0306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A0=CE=B1=CE=BD=CE=B1=CE=B3=CE=B9=CF=8E=CF=84=CE=B7?= =?UTF-8?q?=CF=82=20=CE=93=CE=B5=CF=89=CF=81=CE=B3=CE=B1=CE=BA=CF=8C=CF=80?= =?UTF-8?q?=CE=BF=CF=85=CE=BB=CE=BF=CF=82?= Date: Mon, 15 May 2023 15:19:26 +0300 Subject: [PATCH 4/4] fix: sig instead of specTypes Co-authored-by: Paul Berg --- src/runner/PlutoRunner.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runner/PlutoRunner.jl b/src/runner/PlutoRunner.jl index 17ba821953..5e3b49e81f 100644 --- a/src/runner/PlutoRunner.jl +++ b/src/runner/PlutoRunner.jl @@ -1097,7 +1097,7 @@ function pretty_stackcall(frame::Base.StackFrame, linfo::Core.MethodInstance) end function pretty_stackcall(frame::Base.StackFrame, linfo::Method) - sprint(Base.show_tuple_as_call, linfo.name, linfo.specTypes) + sprint(Base.show_tuple_as_call, linfo.name, linfo.sig) end function pretty_stackcall(frame::Base.StackFrame, linfo::Module)