JuliaDebug / JuliaDebug/Cthulhu.jl

Print `code_typed`-friendly signature for the current frame

Open
#689 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
709
Forks
46
Avg merge
1d 13h
Merged PRs (30d)
2

Description

If Cthulhu gives some questionable results, it's often useful to confirm against code_typed. This can be difficult to do if the current frame is deep in the call stack and/or has many arguments/is a keyword call. For example, this signature came up from a keyword call in ModelingToolkit.jl

var"#System#536"(constraints, noise_eqs, jumps, costs, consolidate, observed, bindings, initial_conditions, guesses, systems, initialization_eqs, continuous_events, discrete_events, connector_type, assertions, metadata, gui_metadata, is_dde, tstops, inputs, outputs, tearing_state, ignored_connections, parent, description, name, discover_from_metadata, initializesystem, is_initializesystem, is_discrete, preface, checks, __legacy_defaults__, ::Type{System}, eqs::Vector{Equation}, iv, dvs, ps, brownians)

The above is the signature that Cthulhu prints for the method. Could there be an option to display code_typed-friendly syntax with fully-qualified types to allow copy-pasting it into code_typed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the code that prints the current frame's method signature in Cthulhu.jl, then compare its output with the syntax accepted by Julia's code_typed. Define the option's expected output using the keyword-call example in the issue; done when a displayed signature can be copied into code_typed with fully qualified types.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.