feat: allow dynamic includes - #196
Open
shihab-dls wants to merge 2 commits into
Open
Conversation
coretl
reviewed
Jun 2, 2026
| "title": "In Subscreen", | ||
| "type": "boolean" | ||
| }, | ||
| "dynamic": { |
Contributor
There was a problem hiding this comment.
I wonder if optional or allow_missing would be a clearer name?
| resolved: list[ComponentUnion] = [] | ||
| include_components = find_components(component.file_name, yaml_paths) | ||
| if component.dynamic: | ||
| # Track this dynamic include at its position in final components list |
Contributor
There was a problem hiding this comment.
Temporarily ignore then put it back afterwards seems like an architectural issue, I guess this would be solved with a bigger refactor (later) like you were mentioning in person.
| resolved.extend( | ||
| self.expand_includes(Include(file_name=name), yaml_paths) | ||
| ) | ||
| continue # Skip dynamic include, leaving it as an IgnoredComponent |
Contributor
There was a problem hiding this comment.
I don't understand this comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR allows
Includecomponents to be set todynamic=True, wherein they may be resolved after ibek generation of sub-entities.Defining:
stores the position of this include, and replaces it with an
IgnoredComponent. Upon callingresolve_dynamic_children, if a serializedparent.pvi.device.yamlthis is replaces with adynamic=falseIncludeand expanded, otherwise it is left as anIgnoredComponent.This is related to this ibek PR