Skip to content

Commit bb28ea8

Browse files
authored
Add notes that doc lookup requires REPL (#52065)
Documentation lookup with `@doc`, `apropos`, and `Base.Docs.doc` is exported by `Base`, but the actual implementation lives in the REPL. Since the REPL is no longer included in the sysimg, these functions only work if the REPL stdlib is loaded explicitly. This PR adds compat admonitions in several places.
1 parent 2e2fac5 commit bb28ea8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

base/docs/Docs.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ You can retrieve docs for functions, macros and other objects as follows:
5151
@doc @time
5252
@doc md""
5353
54+
!!! compat "Julia 1.11"
55+
In Julia 1.11 and newer, retrieving documentation with the `@doc` macro requires that
56+
the `REPL` stdlib is loaded.
57+
5458
## Functions & Methods
5559
Placing documentation before a method definition (e.g. `function foo() ...` or `foo() = ...`)
5660
will cause that specific method to be documented, as opposed to the whole function. Method
@@ -787,6 +791,9 @@ When `pattern` is a string, case is ignored. Results are printed to `io`.
787791
```
788792
help?> "pattern"
789793
```
794+
795+
!!! compat "Julia 1.11"
796+
In Julia 1.11 and newer, `apropos` requires that the `REPL` stdlib is loaded.
790797
"""
791798
function apropos end
792799

@@ -797,6 +804,9 @@ Return all documentation that matches both `binding` and `sig`.
797804
798805
If `getdoc` returns a non-`nothing` result on the value of the binding, then a
799806
dynamic docstring is returned instead of one based on the binding itself.
807+
808+
!!! compat "Julia 1.11"
809+
In Julia 1.11 and newer, `Docs.doc` requires that the `REPL` stdlib is loaded.
800810
"""
801811
function doc end
802812

doc/src/manual/documentation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ documentation between different versions of a function:
331331
@doc (@doc foo!) foo
332332
```
333333

334+
!!! compat "Julia 1.11"
335+
In Julia 1.11 and newer, retrieving documentation with the `@doc` macro requires that
336+
the `REPL` stdlib is loaded.
337+
334338
Or for use with Julia's metaprogramming functionality:
335339

336340
```julia

0 commit comments

Comments
 (0)