Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 202dd979c6efc278bd38506b3e3ff8ca5f75eccb
https://github.com/WebKit/WebKit/commit/202dd979c6efc278bd38506b3e3ff8ca5f75eccb
Author: Jonathan Bedard <[email protected]>
Date: 2026-04-16 (Thu, 16 Apr 2026)
Changed paths:
A Tools/Scripts/libraries/webkitcorepy/render-config
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
A Tools/Scripts/libraries/webkitcorepy/webkitcorepy/config.py
A Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/config_unittest.py
A
Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/example-config.yaml
Log Message:
-----------
[webkitcorepy] Add support for dynamic configuration files
https://bugs.webkit.org/show_bug.cgi?id=308058 rdar://problem/170556228
Reviewed by Aakash Jain.
Build a dynamic configuration renderer based on the json-e module.
* Tools/Scripts/libraries/webkitcorepy/render-config: Add stand-alone script to
render a dynamic configuration.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Add pyyaml and
jsone.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/config.py: Added.
(Config.Mode): Enum for different display modes.
(Config.render): Recursively render a dictionary. If a $context is provided,
render each child with this function.
Otherwise, invoke jsone's render on all children.
(Config.render.dynamic_pop):
(Config.loads): Load YAML or JSON configuration from a string.
(Config.load): Load YAML or JSON configuration from a file.
(Config.__init__): Pass display mode on construction.
(Config.dump): Print the rendered configuration to a file.
(Config.dumps): Print the rendered configuration as a string.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/config_unittest.py:
Added.
(ConfigRenderTestCase): Added.
(ConfigLoadsTestCase): Added.
(ConfigLoadTestCase): Added.
(ConfigDumpsTestCase): Added.
(ConfigPopTestCase): Added.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/example-config.yaml:
Add an example configuration to
demonstrate the features of the configuration renderer.
Canonical link: https://commits.webkit.org/311395@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications