Skip to content

Conversation

alexandergunnarson
Copy link

@alexandergunnarson alexandergunnarson commented Jun 1, 2025

First of all, awesome work on WhereTraits.jl!

Here's the bug in Julia 1.11.5 (and I suppose potentially others) that prevents WhereTraits.jl from being usable:

caused by: LoadError: MethodError: no method matching parsedoc(::Base.Docs.DocStr)
The function `parsedoc` exists, but no method is defined for this combination of argument types.
Stacktrace:
  [1] iterate
    @ ./generator.jl:48 [inlined]
  [2] _collect
    @ ./array.jl:811 [inlined]
  [3] collect_similar
    @ ./array.jl:720 [inlined]
  [4] map
    @ ./abstractarray.jl:3371 [inlined]
  [5] mygetdoc(binding::Base.Docs.Binding, sig::Type)
    @ WhereTraits.Utils.DocsHelpers ~/.julia/packages/WhereTraits/BCLdf/src/Utils/DocsHelpers.jl:52
  [6] mygetdoc(object::Function, sig::Type)
    @ WhereTraits.Utils.DocsHelpers ~/.julia/packages/WhereTraits/BCLdf/src/Utils/DocsHelpers.jl:65
  [7] top-level scope
    @ ~/.julia/packages/WhereTraits/BCLdf/src/Syntax/Rendering.jl:499
  [8] include(mod::Module, _path::String)
    @ Base ./Base.jl:557
  [9] include(x::String)
    @ Arg.var"../../../common-jl/release/src/Collection.jl" ~/.julia/packages/From/GzHQx/src/From.jl:131
 [10] top-level scope
    @ ~/.julia/packages/From/GzHQx/src/From.jl:131
 [11] eval
    @ ./boot.jl:430 [inlined]
 [12] eval
    @ ./Base.jl:130 [inlined]
 [13] lazy_load_file(f::From.var"#11#12", root::Module, file_module_sym::Symbol)
    @ From ~/.julia/packages/From/GzHQx/src/From.jl:131
 [14] from_local_file(m::Module, s::LineNumberNode, path::String, root_ex::Expr)
    @ From ~/.julia/packages/From/GzHQx/src/From.jl:102
 [15] from_m(m::Module, s::LineNumberNode, path::String, root_ex::Expr)
    @ From ~/.julia/packages/From/GzHQx/src/From.jl:60
 [16] var"@from"(__source__::LineNumberNode, __module__::Module, path::Any, ex::Expr)
    @ From ~/.julia/packages/From/GzHQx/src/From.jl:27
 [17] include
    @ ./Base.jl:557 [inlined]
 [18] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2881
 [19] top-level scope
    @ stdin:6
in expression starting at /arg/modules/common-jl/release/src/Collection.jl:19

For reference:

julia> methods(Base.Docs.parsedoc)
# 1 method for generic function "parsedoc" from Base.Docs:
 [1] parsedoc(d::Base.Docs.DocStr)
     @ REPL ~/.julia/juliaup/julia-1.11.5+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/docview.jl:104

I realize that the change from Julia 1.6 to Julia 1.11 in this PR is heavy-handed, so let me know what better approach you see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant