-
Notifications
You must be signed in to change notification settings - Fork 501
Description
A MWE: Start julia --depwarn=error and execute
julia> using Documenter
julia> module E
module B
struct C end
export C
Base.@deprecate_binding D C
end
using .B
export C, D
end
Main.E
julia> Documenter.submodules(E)
WARNING: using deprecated binding B.D in E.
, use C instead.
Set{Module} with 2 elements:
Main.E.B
Main.EThe problem is that isdefined (and isdeprecated) in
Documenter.jl/src/utilities/utilities.jl
Line 221 in 76e83a1
| if Base.isidentifier(name) && isdefined(root, name) && !isdeprecated(root, name) |
if Base.isidentifier(name) && Base.isbindingresolved(root, name) && isdefined(root, name) && !isdeprecated(root, name)seems to fix the issue.
That being said, this problem is only present in Julia < 1.12 (the MWE works successfully in e.g. 1.12.0-rc1). In February, Keno removed the need for Base.isbindingresolved (it's deprecated in 1.12 and just unconditionally returns true) in JuliaLang/julia#57253, and in the same PR also remove these patterns isbindingresolved(...) && isdefined(...) and isbindingresolved(...) && !isdeprecated(...) in base julia. Since the current LTS is 1.10 one might argue that it's still worth fixing this issue in Documenter on Julia 1.10 and 1.11.