mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 11:18:40 +08:00
Utilities/Sphinx: Fix parallel documentation builds for 3.26
In commit d78bfa1ecc
(Utilities/Sphinx: support cmakedomain running in
parallel, 2022-10-24, v3.26.0-rc1~495^2) we declared the domain as
parallel-safe without actually implementing the required
`merge_domaindata` method.
Issue: #24076
This commit is contained in:
@@ -457,6 +457,19 @@ class CMakeDomain(Domain):
|
|||||||
for fullname in to_clear:
|
for fullname in to_clear:
|
||||||
del self.data['objects'][fullname]
|
del self.data['objects'][fullname]
|
||||||
|
|
||||||
|
def merge_domaindata(self, docnames, otherdata):
|
||||||
|
"""Merge domaindata from the workers/chunks when they return.
|
||||||
|
|
||||||
|
Called once per parallelization chunk.
|
||||||
|
Only used when sphinx is run in parallel mode.
|
||||||
|
|
||||||
|
:param docnames: a Set of the docnames that are part of the current chunk to merge
|
||||||
|
:param otherdata: the partial data calculated by the current chunk
|
||||||
|
"""
|
||||||
|
for refname, (docname, objtype) in otherdata['objects'].items():
|
||||||
|
if docname in docnames:
|
||||||
|
self.data['objects'][refname] = (docname, objtype)
|
||||||
|
|
||||||
def resolve_xref(self, env, fromdocname, builder,
|
def resolve_xref(self, env, fromdocname, builder,
|
||||||
typ, target, node, contnode):
|
typ, target, node, contnode):
|
||||||
targetid = '%s:%s' % (typ, target)
|
targetid = '%s:%s' % (typ, target)
|
||||||
|
Reference in New Issue
Block a user