Repository navigation
ST6RI-984 (preliminary) Values computed while a reference is transiently unresolved are kept after it resolves - #825
Merged
Merged
Conversation
This avoids spurious validateBindingConnectorTypeConformance warnings.
vincemolnar
approved these changes
Oct 28, 2026
vincemolnar
left a comment
Contributor
There was a problem hiding this comment.
Looks good, and executes as expected.
Minor comment: in the description of the first change, KerMLValidation.doCheckBindingConnector should be KerMLValidator.doCheckBindingConnector.
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.
This PR resolves some problems with reference resolution caused by changes in the 2026-09 release. This includes some spurious validation warnings and unresolved proxies remaining in the model.
Problems fixed
A metadata value naming an element that found only through a second import got the warning "Bound features should have conforming types":
After
transformAll(…, true), the model contained an unresolved proxy (anAcceptActionUsageobject) owned by the implied binding connector, whichSysML2XMI -gwrites out. The examples insysml/src/examples/Metadata Examplesgot 10 such warnings.After
EcoreUtil.resolveAll, a feature redefined in a type whose supertype comes from semantic metadata was inherited both redefined and not redefined ("Duplicate of inherited member name …"), for example 70 times insysml/src/examples/Arrowhead Framework Example.(Also before 2026-09.) In
kerml/src/examples/Association Examples/ProductSelection_OwnedEnds.kerml, aftertransformAll(…, true), an impliedSubsettingowned an unresolved proxy.Cause
A name lookup nested in the resolution of another reference can fail because the scope excludes the elements whose resolution is in progress.
LazyLinkingResourcethen records the reference as unresolvable until the next change to the resource. Until PRs #815/#821 and #818, the result parameters and default multiplicities created during name resolution changed the resource and so discarded these records. Now the records persist, and values computed and cached in the meantime (an implicit binding connector, a redefinition closure) keep the unresolved proxy.Changes
KerMLValidator.doCheckBindingConnector– Perform proxy resolution on binding connector ends before checking thevalidateBindingConnectorTypeConformanceconstraint (which is actually not in the specification yet).Note. The above is a quick preliminary fix for inclusion in an incremental release, as consideration continues on a more general resolution (see PR ST6RI-984 (original) Values computed while a reference is transiently unresolved are kept after it resolves #824).
FeatureAdapter.getAllRedefinedFeatures– Do not cache a result that contains an unresolved proxy.ConnectorUtil.addConnectorEndTo,TypeUtil.insertImplicitSpecializations,FeatureUtil.insertImplicitTypeFeaturings– Do not add an unresolved proxy as an owned related element.Tests
NestedResolutionTestcovers problems 1 and 2; both tests fail without these changes. The full build with all tests passes.