mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8935 from tk0miya/8933_viewcode_backlink_on_parallel_build
Fix #8933: viewcode: Failed to create back-links on parallel build
This commit is contained in:
commit
2c987897eb
1
CHANGES
1
CHANGES
@ -85,6 +85,7 @@ Bugs fixed
|
||||
:confval:`cpp_index_common_prefix` instead of the first that matches.
|
||||
* C, properly reject function declarations when a keyword is used
|
||||
as parameter name.
|
||||
* #8933: viewcode: Failed to create back-links on parallel build
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -146,7 +146,14 @@ def env_merge_info(app: Sphinx, env: BuildEnvironment, docnames: Iterable[str],
|
||||
if not hasattr(env, '_viewcode_modules'):
|
||||
env._viewcode_modules = {} # type: ignore
|
||||
# now merge in the information from the subprocess
|
||||
env._viewcode_modules.update(other._viewcode_modules) # type: ignore
|
||||
for modname, entry in other._viewcode_modules.items(): # type: ignore
|
||||
if modname not in env._viewcode_modules: # type: ignore
|
||||
env._viewcode_modules[modname] = entry # type: ignore
|
||||
else:
|
||||
used = env._viewcode_modules[modname][2] # type: ignore
|
||||
for fullname, docname in entry[2].items():
|
||||
if fullname not in used:
|
||||
used[fullname] = docname
|
||||
|
||||
|
||||
def env_purge_doc(app: Sphinx, env: BuildEnvironment, docname: str) -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user