modules: Add a way to forward submodules definitions to the parent. #30991
+57
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
This change is made to fill a gap in the module system, which is the ability to forward the content of a submodule option to the parent module system.
The motivation for this change comes from the last rewrite of the httpd services that I made (not commited), which are extending the
extraConfig
ofhttpd
, by re-defining the merge logic.This change avoid the merge logic duplication by forwarding the definitions of the submodules to the parent module. Thus, the merge logic does not have to be manually written to merge the content of the different submodules in the parent module. More over, this modification takes the option definition before they are being processed by the merge & apply functions, which prevent issues in case of non-re-entrant merge functions.
Things done