@@ -16,7 +16,6 @@ import GtkObservables: Canvas
16
16
import Cairo
17
17
using Graphics
18
18
using Preferences
19
- using Requires
20
19
21
20
using FlameGraphs: Node, NodeData
22
21
const CONTROL = Gtk4. ModifierType_CONTROL_MASK
@@ -564,28 +563,6 @@ discardfirstcol(A) = A[:,2:end]
564
563
discardfirstcol (A:: IndirectArray ) = IndirectArray (A. index[:,2 : end ], A. values)
565
564
566
565
function __init__ ()
567
- @require Cthulhu= " f68482b8-f384-11e8-15f7-abe071a5a75f" begin
568
- function descend_clicked (; optimize= false , iswarn= true , hide_type_stable= true , kwargs... )
569
- st = clicked[]
570
- if st === nothing || st. linfo === nothing
571
- @warn " the bar you clicked on might have been inlined and unavailable for inspection. Click on a non-inlined bar to `descend`."
572
- return nothing
573
- end
574
- return Cthulhu. descend (st. linfo; optimize, iswarn, hide_type_stable, kwargs... )
575
- end
576
- function ascend_clicked (; hide_type_stable= true , kwargs... )
577
- st = clicked[]
578
- if st === nothing || st. linfo === nothing
579
- @warn " the bar you clicked on might have been inlined and unavailable for inspection. Click on a non-inlined bar to `descend`."
580
- return nothing
581
- end
582
- if hasmethod (Cthulhu. buildframes, Tuple{Vector{StackTraces. StackFrame}})
583
- return Cthulhu. ascend (clicked_trace[]; hide_type_stable, kwargs... )
584
- else
585
- return Cthulhu. ascend (st. linfo; hide_type_stable, kwargs... )
586
- end
587
- end
588
- end
589
566
Base. Experimental. register_error_hint (MethodError) do io, exc, argtypes, kwargs
590
567
if (exc. f === descend_clicked || exc. f === ascend_clicked) && isempty (argtypes)
591
568
printstyled (io, " \n `using Cthulhu` is required for `$(exc. f) `" ; color= :yellow )
0 commit comments