Report broken references in contained connection properties 馃 - #3115
Open
lwrage wants to merge 2 commits into
Open
Report broken references in contained connection properties 馃#3115lwrage wants to merge 2 commits into
lwrage wants to merge 2 commits into
Conversation
Model equivalent contained reference values on a component and connection, then refine away their target. Assert that both associations remain declarative and that instantiation reports both missing references, while the unrefined control remains error-free.
Report reference-instantiation issues when a contained property association is retained for a semantic connection. Place the diagnostic on the attached connection instance because the copied association stored in SCProperties is not yet part of the instance resource.
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.
Fixes #3106
Cause
CacheContainedPropertyAssociationsSwitch collected reference-instantiation problems for copied contained associations, but the semantic-connection branch recorded the association in SCProperties without reporting those problems. The equivalent component branch reported them.
Correction
Report the collected problems after retaining the semantic-connection association. The diagnostic is attached to the connection instance because the copied association in SCProperties is detached from the instance resource at that point.
Regression
Issue3106Test uses a valid external AADL model with matching Actual_Processor_Binding and Actual_Connection_Binding references. A refinement removes the referenced instance object. The test verifies that both associations retain the declarative platform.core path and that instantiation reports two missing-reference errors. An unrefined control verifies that resolvable references produce no errors.
The regression failed before the production change with one reported error instead of two.
Validation
Dependencies
None. The branch is based directly on origin/master at 7729ae9.
Residual risk
The new diagnostic is located on the connection instance rather than the copied ReferenceValue because that copied value is not attached to a resource when the problem is reported. Reporting is limited to associations that are retained; constant overrides keep their existing behavior.