Because strict parenting is enforced when pushing scope, a previously popped global scope cannot be resolved otherwise it may result into errors if it is pushed from a different path.
E.g.
push flavor global=true
push app-type global=true
push media global=false
pop media
pop app-type
push media global=false
The last push fails because flavor.app-type.media is resolved instead of creating flavor.media and flavor.app-type.media is not a direct child of flavor.
Fix
We need to update Context.popScope to clear the edge and merge the values in the parent scope.
Compatibility
If this issue impacts older releases of the engine, we will need to start processing the archetypes at build time to produce compatibles scripts.
Problem
Popped global scopes are incorrectly resolved.
Because strict parenting is enforced when pushing scope, a previously popped global scope cannot be resolved otherwise it may result into errors if it is pushed from a different path.
E.g.
The last push fails because
flavor.app-type.media
is resolved instead of creatingflavor.media
andflavor.app-type.media
is not a direct child offlavor
.Fix
We need to update
Context.popScope
to clear the edge and merge the values in the parent scope.Compatibility
If this issue impacts older releases of the engine, we will need to start processing the archetypes at build time to produce compatibles scripts.