Skip to content

Commit

Permalink
Fix :cfg:prop: and :cmake:prop: being confused
Browse files Browse the repository at this point in the history
This was data accidentally shared between the custom Sphinx domains.
  • Loading branch information
iguessthislldo committed Apr 8, 2024
1 parent 46e7b8e commit 1eebcec
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/devguide/run_time_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ OpenDDS configuration is concerned with three main areas:
Each pluggable transport can be configured separately.
See :ref:`config-transport` for details.

.. _config-store-keys:

**********************
Configuration Approach
**********************
Expand Down
10 changes: 8 additions & 2 deletions docs/sphinx_extensions/config_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,14 @@ def transform_content(self, contentnode: addnodes.desc_content) -> None:
rst = ViewList()

# Config store key
key = key_canonicalize(ctx.get(-2, 'sec_name'), ctx.get(-2, 'arguments'), ctx.get_name())
rst.append(f'| **Config store key**: ``{key}``', f'{__name__}', 1)
try:
key = key_canonicalize(
ctx.get(-2, 'sec_name'), ctx.get(-2, 'arguments'), ctx.get_name())
rst.append(f'| :ref:`Config store key <config-store-keys>`: ``{key}``',
f'{__name__}', 1)
except Exception as e:
e = ValueError(f'Something went wrong with key_canonicalize: {e}')
ConfigDomain.logger.warning(e, location=self.get_location())

# :required: flag
required = 'required' in self.options
Expand Down
19 changes: 10 additions & 9 deletions docs/sphinx_extensions/custom_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,16 @@ class CustomDomain(Domain):
label = None
logger = None

object_types = {
}
directives = {
}
roles = {
}
initial_data: dict[str, dict[tuple[str, str], str]] = {
'objects': {}, # fullname -> docname, objtype
}
def __init_subclass__(cls):
cls.object_types = {
}
cls.directives = {
}
cls.roles = {
}
cls.initial_data = {
'objects': {}, # fullname -> docname, objtype
}

@property
def objects(self) -> dict[tuple[str, str], tuple[str, str]]:
Expand Down

0 comments on commit 1eebcec

Please sign in to comment.