-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
load: include details about included files on *Project (#444)
Add a map to `Project` that has Compose YAML filename as key and any `IncludeConfig`s loaded from it. This is populated as the project is recursively loaded. For example: ``` proj/ compose.yaml a/ compose.yaml b/ compose.yaml ``` If `project/compose.yaml` has: ``` include: ['./a/compose.yaml'] ``` And `project/a/compose.yaml` has: ``` include: ['../b/compose.yaml'] ``` The final result after load is conceptually: ``` { "proj/compose.yaml": ["proj/a/compose.yaml"], "proj/a/compose.yaml": ["proj/b/compose.yaml"], } ``` (Note: in reality, it's a list of `IncludeConfig`, which has multiple fields. Example is simplified.) Relative path resolution is based on overall loader configuration, but note that disabling it does not work properly for `include` currently due to other issues. This makes it possible for the caller to understand a bit more about the loaded project resources. We're really overdue for a bit of an overhaul/refactor of the loader - at that point, I think it might be better to have a `Loader` object type that can track stuff like this on the instance because it's weirdly both part of the project and NOT part of the project at the moment (similar to `Profiles`, project name, etc). Signed-off-by: Milas Bowman <[email protected]>
- Loading branch information
Showing
5 changed files
with
77 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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