ST6RI-749 Bindings with the standard library metadata causes a warning only in Jupyter environment #551
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.
After the 2024-02 release, bindings of enumeration features of metadata usages of metadata definitions from library models, such as
began causing "Bound features should have conforming types" warnings in the Jupyter environment. This did not happen in the Eclipse editor.
These warnings were caused by the implicit typing of the enumerated value not being properly set to its containing enumeration definition. The typing was only being established when a full transformation was done on the enumerated value declaration. In the Eclipse environment, a full transformation is done on the entire contents of a library model resource when it is read into memory. This is not the case, however, when library resources are preloaded into the Jupyter kernel for SysML, which is why the warnings on happened in the Jupyter environment. There was a change to the implementation of the typing check in 2024-02, such that the check failed if a feature had no types (which should never be the case), which is why the warnings did not happen before 2024-02.
The implicit typing of enumerated values is actually a special case of the general rules for implicit typing of variant features of variations (enumeration definitions are kinds of variation definitions). This PR moves the adding of variation typing into the implicit general type computation for usages, so that it is included in the "on demand" computation of implicit generalization during name resolution, which eliminates the spurious warnings.