Skip to content

Conversation

StaticRocket
Copy link
Member

Add a new validation wrapper to guard against problematic ifconfig
values. This also allows us to quickly make all conditionally masked
sections visible and play with that logic quickly in a global fashion.
This basically adds an early warning mechanism for config values that
are no longer valid, misspellings, etc.

This is a bit of a hack. The process_ifconfig_nodes in sphinx actually
builds a local namespace for evaluating the Python given in the
directive. As such only builtin functions are carried over.

This means to get anything into that context we need to taint the global
builtins definitions. This is fine so long as we don't collide with
anything.

Add a new validation wrapper to guard against problematic ifconfig
values. This also allows us to quickly make all conditionally masked
sections visible and play with that logic quickly in a global fashion.
This basically adds an early warning mechanism for config values that
are no longer valid, misspellings, etc.

This is a bit of a hack. The process_ifconfig_nodes in sphinx actually
builds a local namespace for evaluating the Python given in the
directive. As such only builtin functions are carried over.

This means to get anything into that context we need to taint the global
builtins definitions. This is fine so long as we don't collide with
anything.

Signed-off-by: Randolph Sapp <[email protected]>
Use the new key_within helper and add a buggy platform entry to see if
it catches it.

Signed-off-by: Randolph Sapp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants