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
Fix 'docstrings potentially missing' warnings #72
Comments
I had a look at the Use case: σ(d::AbstractVector{<:Real}, B::BallInf) and this doc signature: σ(::AbstractVector{Float64}, ::BallInf) In object == LazySets.σ-Tuple{AbstractArray{Float64,1},LazySets.BallInf}
object.binding == LazySets.σ
object.signature == Tuple{AbstractArray{Float64,1},LazySets.BallInf} So far so good. Now let us see what signature is stored in signatures == Set(Type[ ..., Tuple{AbstractArray{#s9,1} where #s9<:Real,LazySets.BallInf}, ...]) (The identifier
σ(::AbstractVector{N} where N<:Real, ::BallInf) This still does not help. It seems that |
Even worse: How can we resolve the warnings for shared type parameters such as in addconstraint!(P::HPolygon{N}, constraint::LinearConstraint{N}) where {N<:Real} Current docs signature: addconstraint!(::HPolygon{Float64}, ::LinearConstraint{Float64}) The following does not work because it is not even found in an earlier phase of addconstraint!(::HPolygon{<:Real}, ::LinearConstraint{<:Real}) Note that the expected docs signature has a strange signatures == Set(Type[ Union{Tuple{LazySets.HPolygon{N},LazySets.LinearConstraint{N}}, Tuple{N}} where N<:Real, ... ]) |
Another comment: intersection(L1::Line{N}, L2::Line{N})::Vector{N} where {N<:Real} in Base.:* :: Tuple{AbstractArray{#s13,2} where #s13<:Real,LazySets.LazySet} |
I am now certain that this is a problem with Tuple{AbstractArray{#s1,1} where #s1<:Real,LazySets.HPolygonOpt} This is the object that is created from the doc string. The array of signatures for this function contains the following: Tuple{AbstractArray{#s13,1} where #s13<:Real,LazySets.HPolygonOpt} Clearly the two tuples are identical up to renaming of the type parameter. But a |
Another issue: The hyperlinks in the HTML documentation do not work if we include default values. See, e.g., By removing |
i dunno.. once i tried to reproduce warnings starting from a very simple example that has say two different functions and uses |
The problem occurs as soon as you have two methods with the same name, see here. |
then it would be nice to know if this is a known bug in documenter or not. |
Here is a minimal example to reproduce the main problem (uses our
export foo
"""
This is a very nice function.
"""
function foo(::Vector{N}, ::N) where {N<:Signed}
println("foo_signed")
end
"""
This is a very poor function.
"""
function foo(::Vector{N}, ::N) where {N<:AbstractFloat}
println("foo_float")
end Then in include("test.jl") Then in some docs file add (with \```@docs
foo(::Vector{N}, ::N) where {N<:Signed}
foo(::Vector{N}, ::N) where {N<:AbstractFloat}
\``` (Using concrete types will not help, either.) Result: !! XX docstrings potentially missing:
...
LazySets.foo :: Union{Tuple{Array{N,1},N}, Tuple{N}} where N<:Signed
LazySets.foo :: Union{Tuple{Array{N,1},N}, Tuple{N}} where N<:AbstractFloat
... However, the URLs in the HTML output are created correctly: |
I have asked about this in the |
This is now more or less supported. I will send a PR in the near future. |
#72 - Fix 'where' syntax in doc references
Creating the documentation warns about potentially missing docstrings.
However, they are defined and occur properly in the final documentation.
Most notably:
LazySets.σ
LazySets.apply_recipe
For the non-
apply_recipe
functions the problem is related to type parameters.The text was updated successfully, but these errors were encountered: