JuliaDebug / JuliaDebug/Cthulhu.jl
Cannot descend into function without revising
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 709
- Forks
- 46
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 2
Description
On https://github.com/JuliaSymbolics/SymbolicUtils.jl/commit/e7016cc7c0ee2713bbcc29d28af60e54b2d07b85, with
Julia Version 1.12.2
Commit ca9b6662be4 (2025-11-20 16:25 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: macOS (arm64-apple-darwin24.0.0)
CPU: 14 × Apple M4 Max
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, apple-m4)
GC: Built with stock GC
Threads: 16 default, 2 interactive, 10 GC (on 10 virtual cores)
Environment:
JULIA_PKG_PRECOMPILE_AUTO = 0
JULIA_PKG_USE_CLI_GIT = true
and global environment
Status `~/.julia/environments/v1.12/Project.toml`
[6e4b80f9] BenchmarkTools v1.6.3
[0ca39b1e] Chairmarks v1.3.1
⌃ [f68482b8] Cthulhu v2.17.10
[31a5f54b] Debugger v0.7.16
[5903a43b] Infiltrator v1.9.4
[5fb14364] OhMyREPL v0.5.32
[e4faabce] PProf v3.2.0
[4722fa14] PkgAuthentication v2.3.2
⌃ [295af30f] Revise v3.12.2
[aa65fe97] SnoopCompile v3.2.4
[e2b509da] SnoopCompileCore v3.1.1
[1e6cf692] TestEnv v1.102.3
[44cfe95a] Pkg v1.12.0
[8dfed614] Test v1.11.0
In the REPL
julia> using Revise, Cthulhu
julia> using SymbolicUtils
julia> @syms x y;
julia> @descend sorted_arguments(x + y)q
In Typed IR with warn enabled, the IR contains
2 ─ %9 = SymbolicUtils._sorted_args1::Core.Const(SymbolicUtils._sorted_args1)
│ %10 = dynamic (%9)(x)::ReadOnlyArrays.ReadOnlyVector{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}, SymbolicUtils.SmallVec{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}, Vector{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}}}}
However, I cannot descend into this call:
Toggles: [w]arn, [h]ide type-stable statements, [o]ptimize, [d]ebuginfo, [r]emarks, [e]ffects, e[x]ception_types, [i]nlining costs, [t]ype_annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always.
Show: [S]ource, [A]ST, [T]yped, [L]LVM, [N]ative.
Actions: [q]uit, ⟵ ascend, [b]ookmark, [E]dit source code, [R]evise and redisplay, dum[P] params cache.
• ↩
Pressing R to "Revise and redisplay"
Toggles: [w]arn, [h]ide type-stable statements, [o]ptimize, [d]ebuginfo, [r]emarks, [e]ffects, e[x]ception_types, [i]nlining costs, [t]ype_annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always.
Show: [S]ource, [A]ST, [T]yped, [L]LVM, [N]ative.
Actions: [q]uit, ⟵ ascend, [b]ookmark, [E]dit source code, [R]evise and redisplay, dum[P] params cache.
• %10 = _sorted_args1(::SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal})::…
Now shows this option. This happens at multiple levels of the stack. Descending into this call, the IR
7 ── %28 = SymbolicUtils.:(var"##_sorted_args1#457")::Core.Const(SymbolicUtils.var"##_sorted_args1#457")
│ %29 = dynamic (%28)(x)::ReadOnlyArrays.ReadOnlyVector{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}, SymbolicUtils.SmallVec{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}, Vector{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}}}}
is displayed. Again, I cannot descend into this call but pressing R enables me to.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report in Julia with Revise, Cthulhu, and SymbolicUtils by running @descend sorted_arguments(x + y), then inspect how the displayed dynamic calls are handled before and after pressing R. Compare the multiple stack levels described in the issue; the fix is complete when the reported calls can be descended into without requiring revision and the reproduction no longer shows the failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100