Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndefRefError from doc #44009

Closed
adkabo opened this issue Feb 2, 2022 · 2 comments · Fixed by #44060
Closed

UndefRefError from doc #44009

adkabo opened this issue Feb 2, 2022 · 2 comments · Fixed by #44060
Labels
bug Indicates an unexpected problem or unintended behavior docsystem The documentation building system REPL Julia's REPL (Read Eval Print Loop)

Comments

@adkabo
Copy link
Contributor

adkabo commented Feb 2, 2022

The stacktrace doesn't mention StaticArrays so I'm guessing it's a stdlib issue.

julia> using StaticArrays

julia> SizedVector
SizedVector{S, T} where {S, T} (alias for SizedArray{Tuple{S}, T, 1, 1, TData} where {S, T, TData<:AbstractArray{T, 1}})

help?> SizedVector
search: SizedVector

ERROR: UndefRefError: access to undefined reference
Stacktrace:
 [1] getproperty
   @ ./Base.jl:37 [inlined]
 [2] summarize(io::IOBuffer, TT::Type, binding::Base.Docs.Binding)
   @ REPL /nix/store/15kh8pp59zbnhxcxh2l66xr1hzly00y9-julia-bin-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:286
 [3] summarize(binding::Base.Docs.Binding, sig::Type)
   @ REPL /nix/store/15kh8pp59zbnhxcxh2l66xr1hzly00y9-julia-bin-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:249
 [4] doc(binding::Base.Docs.Binding, sig::Type)
   @ REPL /nix/store/15kh8pp59zbnhxcxh2l66xr1hzly00y9-julia-bin-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:182
 [5] doc(binding::Base.Docs.Binding)
   @ REPL /nix/store/15kh8pp59zbnhxcxh2l66xr1hzly00y9-julia-bin-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:160
 [6] top-level scope
   @ /nix/store/15kh8pp59zbnhxcxh2l66xr1hzly00y9-julia-bin-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:470
@fredrikekre fredrikekre added docsystem The documentation building system REPL Julia's REPL (Read Eval Print Loop) labels Feb 2, 2022
@vtjnash
Copy link
Member

vtjnash commented Feb 3, 2022

this fixes it:

diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl
index a9ecd1e4bb..66f2aba863 100644
--- a/stdlib/REPL/src/docview.jl
+++ b/stdlib/REPL/src/docview.jl
@@ -283,7 +283,7 @@ function summarize(io::IO, TT::Type, binding::Binding)
             println(io, "# Fields")
             println(io, "```")
             pad = maximum(length(string(f)) for f in fieldnames(T))
-            for (f, t) in zip(fieldnames(T), T.types)
+            for (f, t) in zip(fieldnames(T), fieldtypes(T))
                 println(io, rpad(f, pad), " :: ", t)
             end
             println(io, "```")

I could not make a simple MWE though

help?> SizedVector
search: SizedVector

  No documentation found.

  Summary
  ≡≡≡≡≡≡≡≡≡

  struct SizedArray{Tuple{S}, T, 1, 1, TData<:AbstractArray{T, 1}}

  Fields
  ≡≡≡≡≡≡≡≡

  data :: TData<:AbstractArray{T, 1}

  Supertype Hierarchy
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  SizedArray{Tuple{S}, T, 1, 1, TData<:AbstractArray{T, 1}} <: StaticArray{Tuple{S}, T, 1} <: AbstractArray{T, 1} <: Any

@vtjnash vtjnash added the bug Indicates an unexpected problem or unintended behavior label Feb 3, 2022
@cossio
Copy link
Contributor

cossio commented Feb 7, 2022

Another example, possibly the same issue.

help?> FillArrays.SquareEye
ERROR: UndefRefError: access to undefined reference
Stacktrace:
 [1] getproperty
   @ ./Base.jl:37 [inlined]
 [2] summarize(io::IOBuffer, TT::Type, binding::Base.Docs.Binding)
   @ REPL ~/apps/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:286
 [3] summarize(binding::Base.Docs.Binding, sig::Type)
   @ REPL ~/apps/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:249
 [4] doc(binding::Base.Docs.Binding, sig::Type)
   @ REPL ~/apps/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:182
 [5] doc(binding::Base.Docs.Binding)
   @ REPL ~/apps/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:160
 [6] top-level scope
   @ ~/apps/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/docview.jl:541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior docsystem The documentation building system REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants