You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using ETL, it is fine to use the equivalents operation to retrieve target elements created by other rules. However, as soon as you access any attribute in a target element retrieved by equivalents, you are relying on a specific rule execution order, i.e. you are not only expecting the rule to have created the element, but also that the body of the rule to be executed and the element's attributes/relations to be set. This expectation can not be fulfilled by the two-pass execution strategy of ETL.
The static analyzer could flag this as a warning and recommend that the rule accessing the attributes should be annotated as lazy.
The text was updated successfully, but these errors were encountered:
arcanefoam
changed the title
ETL - Detect equivalent elements property access
ETL Static Analysis - Detect equivalent elements property access
Feb 7, 2024
When using ETL, it is fine to use the equivalents operation to retrieve target elements created by other rules. However, as soon as you access any attribute in a target element retrieved by equivalents, you are relying on a specific rule execution order, i.e. you are not only expecting the rule to have created the element, but also that the body of the rule to be executed and the element's attributes/relations to be set. This expectation can not be fulfilled by the two-pass execution strategy of ETL.
The static analyzer could flag this as a warning and recommend that the rule accessing the attributes should be annotated as lazy.
The text was updated successfully, but these errors were encountered: