No documentation for Base packages at REPL help prompt

Hi, when one presses the ? in the REPL to get the help prompt, and then e.g. tries Pkg or Dates, one only gets

help?> Pkg
search: Pkg

  No documentation found.

  No README.md found for module Base.Pkg.

It would be nice if there’d be at least a few lines, and/or a link to the package doc. Could one just add a README.md into, say,

https://github.com/JuliaLang/julia/tree/master/base/pkg
?

Would that be picked up? (I’m building Julia and the doc locally now, but it takes a while…)

2 Likes

The error message should probably be changed to “No docstring or README.md file found for module Base.Pkg”. The help first looks for a docstring associated the module, and then if that isn’t found it looks for a README file (since most external packages have these).

The right way to fix this is just to add a docstring, which is just a string on the line immediately before the module Pkg ... end in the Julia source code.

2 Likes

Thanks Steve, I’ve added rudimentary doc strings for Base/Pkg and Base/Dates, and amended the error msg as you suggested:
https://github.com/JuliaLang/julia/pull/21429

help?> Pkg
search: Pkg

  The Pkg module provides package management for Julia. Try Pkg.status() for a list of installed pkgs,
  Pkg.add("<pkg name>") to add a package, Pkg.update() to update your packages.

  Please see the docs for package management for more information.
2 Likes