Add support for a depth_in_ancestor tag and simplify spec_hierarchy tags
#1177
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.
Adds
depth_in_ancestorwhich lets us see how far up in the hierarchy we need to go to find the blueprint which caused an entity to exist. eg if a type X declares children A, B, and B with child C, then A and B have 1 and C 2. this remains true even for A,B,C inside an X is used in another blueprint, and in that case X will have whatever depth it has in that blueprint.depth_in_ancestoris not defined for a deployed blueprint application root. So if when looking at an entity you want to see which blueprint declared it, look at thespec_hierarchyon the ancestordepth_in_ancestorlevels up. (In particular ifdepth_in_ancestoris equal to the depth in the live deployment, then the entity was included in the root deployment.)Also switches recent
yaml_spec_hierarchyto be called the simpler and betterspec_hierarchyand to use single-key maps eginstead of the more (and unnecessarily) complicated
{kind: spec_hierarchy, contents: [ { summary: "original", contents: "plan" } ]kindis still used for named strings, so as to minimize disruption, but going forward named keys are much simpler