Skip to content

Documenting all exports from Base #26919

Closed as not planned
Closed as not planned
@mbauman

Description

@mbauman

It'd be nice to make sure that all our exports are documented and make sense for the 1.0 release. This is a fairly daunting list, but it is a task that's easily parallelizable and can be tackled incrementally.

There are two classes of undocumented thing.

  • It's just plain undocumented. Add documentation!
  • It's a callable thing and all its methods live within deprecated.jl. In this case, we probably want to @deprecate_binding the binding itself so packages that extend these methods won't be totally surprised when the binding gets removed in 1.0.

I've written a quick and simple script that identifies these two cases and spits out the list. Please feel free to jump in and add PRs to resolve these as you are able! Just be bold and go for it!

julia> searchdocs(mod) = searchdocs!(Any[], Bool[], mod)
       function searchdocs!(objs, isalldep, mod, seen=Set())
           mod in seen && return
           push!(seen, mod)
           for name in names(mod)
               isdefined(mod, name) || continue
               Base.isdeprecated(mod, name) && continue
               b = getfield(mod, name)
               docs = Base.Docs.doc(Base.Docs.Binding(mod, name))
               if startswith(string(docs), "No documentation found")
                   push!(objs, string(mod, '.', name))
                   push!(isalldep, !isempty(methods(b)) && all(x->occursin("deprecated", something(functionloc(x)[1],"")), methods(b)))
               end
               b isa Module && searchdocs!(objs, isalldep, b, seen)
           end
           objs, isalldep
       end
searchdocs! (generic function with 2 methods)

julia> objs, isalldep = searchdocs(Main)

julia> println("### Undocumented exports")
       foreach(x->println("* [ ] `", x, '`'), objs[.!isalldep])
       println("### Undocumented exports that are entirely deprecated")
       foreach(x->println("* [ ] `", x, '`'), objs[isalldep])

Undocumented exports (including module exports)

Edit: updated to remove the entirely-deprecated section

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentationgood first issueIndicates a good issue for first-time contributors to Juliahelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions