Documentation: how to add cross-references to functions in other modules?

I’m trying to add cross-references to some Julia docstrings, but I’m running into problems. Take for example the docstring for Base.@sync in base/task.jl (shortened):

"""
    @sync

Wait until all lexically-enclosed uses of [`@async`](@ref), [`@spawn`](@ref Threads.@spawn),
`@spawnat` and `@distributed` are complete.
"""

How does one add a cross-reference to Distributed.@spawnat to this docstring? None of the following work:

[`@spawnat`](@ref)   # works in doc/src/manual/distributed-computing.md
[`@spawnat`](@ref Distributed.@spawnat)
[`Distributed.@spawnat`](@ref)

For instance, in the first case I get

Error: no doc found for reference '[`@spawnat`](@ref)' in src/base/parallel.md

(Is this related to the fact that in contrast to Threads one has to load Distributed before one can use the module name?)

2 Likes

@mortenpi: Do you know the answer?