Skip to content

descend(Base.show_unquoted, ...) fails #664

@nsajko

Description

@nsajko

Versions

Julia Version 1.13.0-DEV.1030
Commit c6e7650d1e4 (2025-08-22 16:10 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-20.1.8 (ORCJIT, znver2)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 8 virtual cores)
(@v1.13) pkg> st Cthulhu
Status `~/.julia/environments/v1.13/Project.toml`
  [f68482b8] Cthulhu v2.17.4

Reproducers

Reproducer 1

using Cthulhu: descend
descend(Base.show_unquoted, Tuple{IOBuffer, Expr, Int, Int})

The output is missing any items to descend to:

show_unquoted(io::IO, ex::Expr, indent::Int64, prec::Int64) @ Base show.jl:1898
[ Info: This method only fills in default arguments; descend into the body method to see the full source.
1898 function show_unquoted(io::IOBuffer::IO, ex::Expr::Expr, indent::Int64::Int, prec::Int64::Int, quote_level::Int = 0)::Core.Const(nothing)
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
 • ↩

Reproducer 2

using Cthulhu: descend
descend(Base.show_unquoted, Tuple{IOBuffer, Expr, Int, Int, Int})

An assertion error gets thrown right away:

ERROR: AssertionError: length(infos) == length(info.results)
Stacktrace:
  [1] process_info(interp::Cthulhu.CthulhuInterpreter, info::Compiler.CallInfo, argtypes::Vector{Any}, rt::Any, optimize::Bool, exct::Any, effects::Nothing)
    @ Cthulhu ~/.julia/packages/Cthulhu/dkzKO/src/reflection.jl:189
  [2] find_callsites(interp::Cthulhu.CthulhuInterpreter, CI::Core.CodeInfo, stmt_infos::Vector{Compiler.CallInfo}, ci::Core.CodeInstance, slottypes::Vector{Any}, optimize::Bool, annotate_source::Bool, pc2excts::Nothing)
    @ Cthulhu ~/.julia/packages/Cthulhu/dkzKO/src/reflection.jl:64
  [3] 
    @ Cthulhu ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:381
  [4] _descend
    @ ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:289 [inlined]
  [5] _descend
    @ ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:672 [inlined]
  [6] #_descend#114
    @ ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:683 [inlined]
  [7] __descend_with_error_handling(args::Any; terminal::Any, kwargs...)
    @ Cthulhu ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:133
  [8] top-level scope
    @ ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:122
  [9] top-level scope
    @ ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:114
 [10] top-level scope
    @ ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:151
 [11] top-level scope
    @ ~/.julia/packages/Cthulhu/dkzKO/src/CthulhuBase.jl:151
 [12] descend(::Any, ::Vararg{Any}; kwargs...)
    @ Cthulhu ~/.julia/packages/Cthulhu/dkzKO/src/Cthulhu.jl:111
 [13] top-level scope
    @ ~/.julia/packages/Cthulhu/dkzKO/src/Cthulhu.jl:110
 [14] top-level scope
    @ REPL[3]:1
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions