# \`Base.Docs.doc\` failing with 1.11.0

**URL:** https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187
**Category:** General Usage
**Created:** [October 11, 2024, 10:26am UTC](https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187 "2024-10-11T10:26:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sstroemer](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sstroemer](https://discourse.julialang.org/u/sstroemer)
#### Post date: [October 11, 2024, 10:26am UTC](https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187/1 "2024-10-11T10:26:30Z")

</div>

We are using the following function to modify docstrings of some of our types to “dynamically” add information:

```julia
function _finalize_docstring(datatype::Type)
    binding = Base.Docs.aliasof(datatype, typeof(datatype))
    multidoc = Base.Docs.meta(@ __MODULE__ )[binding]
    old_data = multidoc.docs[Union{}].data

    multidoc.docs[Union{}] = Base.Docs.docstr("""
    $(Base.Docs.doc(datatype))

    adding other stuff
    """)
    multidoc.docs[Union{}].data = old_data

    return nothing
end

```

which is called right after defining it

```julia
"""
Base documentation.
"""
struct Foo
    # ...
end

_finalize_docstring(Foo)

```

I tried updating to Julia 1.11 and now get the following error during precompilation:

```console
ERROR: LoadError: MethodError: no method matching doc(::Type{MyModule.Foo})
The function `doc` exists, but no method is defined for this combination of argument types.

```

Does anyone have an idea what changed since 1.10.5 (where it is working perfectly)? Wasn’t sure if that is an actual bug, or if our usage was just hacky and randomly working before, so I thought I’d ask here before opening an issue.

---

<div class="post-metadata">

### Author: ![DanielVandH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielvandh/32/31134_2.png) [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)
#### Post date: [October 11, 2024, 11:03am UTC](https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187/2 "2024-10-11T11:03:11Z")

</div>

Someone had a similar problem on Slack. What if you do `using REPL`?

---

<div class="post-metadata">

### Author: ![sstroemer](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sstroemer](https://discourse.julialang.org/u/sstroemer)
#### Post date: [October 11, 2024, 1:53pm UTC](https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187/3 "2024-10-11T13:53:48Z")

</div>

Thanks!!

It “works”. Using `import REPL` seems to be sufficient. However this obviously requires `REPL` as explicit dependency of the package.

Was there any further information in slack?

---

<div class="post-metadata">

### Author: ![DanielVandH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielvandh/32/31134_2.png) [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)
#### Post date: [October 11, 2024, 2:09pm UTC](https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187/4 "2024-10-11T14:09:02Z")

</div>

Apparently all the methods for `doc` are defined in `REPL`
