Repository navigation
Merge maintenance/mps20261 into master - #1937
Closed
github-actions[bot] wants to merge 50 commits into
Closed
github-actions[bot] wants to merge 50 commits into
github-actions[bot] wants to merge 50 commits into
Conversation
Details: - Add test to reproduce the problem - Add fix for iets3.os issue and prepare fixing iets3.core issue - Refactor code by introducing ArgumentValueList - Update CHANGELOG.md - Fix findings from review
…ribute_vals_1921 Variability: Do not overwrite feature attribute assignments if not necessary
…/mps20251 # Conflicts: # code/languages/org.iets3.opensource/solutions/org.iets3.opensource.build/models/org/iets3/opensource/build/build.mps
Merge maintenance/mps20241 into maintenance/mps20251
…/mps20261 Conflict resolution with Claude Opus, as the merge dialog of MPS 2026.1 wasn't usable (see https://youtrack.jetbrains.com/issue/MPS-40085/Merge-conflict-resolution-Apply-silently-fails-with-IllegalModelAccessError-when-result-needs-reordering). # Conflicts: # code/languages/org.iets3.opensource/languages/org.iets3.variability.configuration.base/models/org.iets3.variability.configuration.base.plugin.mps # code/languages/org.iets3.opensource/solutions/org.iets3.opensource.build/models/org/iets3/opensource/build/build.mps # code/languages/org.iets3.opensource/tests/test.org.iets3.variability.configuration.base/test.org.iets3.variability.configuration.base.msd
Comparing member values used Object.equals, which throws when a member is present but mapped to null. Use the null-safe :ne: operator instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hashCode hashed memberData and recordDeclaration, while equals compared only memberData, so two record values with equal members but different record declarations were equal with differing hash codes. Compare the record declaration in equals as well. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
References to literals of a qualified enum were rendered as "Enum:literal" in the editor but keyed on the bare literal name everywhere else. That mismatch is the bug: when such a reference broke, the auto-resolve quick fix matched the persisted bare name and silently rebound it to a same-named literal in a different enum, changing the text the editor shows. Make the two namespaces agree, and let MPS's own machinery do the rest: - EnumLiteral implements ISmartReferent and overrides getPresentation(reference) with the new presentableName() -- qualified when the enum is, bare otherwise. This feeds NodePresentationUtil#presentation and, through the default cascade, getVisibleMatchingText. - A constraints property getter computes IResolveInfo#resolveInfo from the same method. That is the resolution namespace: it keys ListScope#forResolvableElements, it is what getMatchingText falls through to, and ResolveInfoUpdater rewrites every reference's persisted resolve= string from it on save. Computed, never stored -- as baseLanguage's Classifier does for nested class names. EnumLiteral was already an IResolveInfo via IValidNamedConcept; only the getter was missing. - The EnumLiteralRef editor uses a ref-presentation cell, so the cell and the completion row read that one method instead of two functions that happened to agree. The cell gets an explicit id so editor tests need not name a generated one. That makes the special-casing unnecessary, so it goes: - QualifierRef, the auxiliary two-step concept for reaching a qualified enum's literals, with its editor and constraints. It had no instances, no typesystem rule, and was always an error node when persisted. - Both hand-written EnumLiteralRef substitute menus. MPS regenerates the equivalent from the implicit smart reference attribute, and it now reads its matching text from ISmartReferent. - The qualified filter in the EnumLiteralRef scope. What keeps a qualified enum's literals out of the general completion list is PatternUtil requiring the first typed character to match, so they surface only once the enum name is typed. renderReadable() now agrees with the editor for qualified enums. Five EditorTestCases in test.kernelf.editor.enums cover bare-name binding, the cross-enum case that motivated this, the negative case, the qualified name, and retyping to a sibling literal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
getUniquelyNamedElements() collected ValExpression/LocalVarDeclExpr from thisNode.body.descendants, which also walks into BaseCommentAttribute children. Commented out declarations therefore reached check_ContainerOfUniqueNames and were reported as duplicate names. Skip elements that have a BaseCommentAttribute ancestor. BlockExpression's implementation needs no change, since it reads the expressions role directly and commented out children do not live there. Adds a NodesTestCase commentedOutUniqueNames covering a commented out val duplicating a live val and a commented out local var duplicating an argument. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
compareTo threw a NullPointerException for a record value without a
record declaration -- what the interpreter builds for inline records --
because effectiveMembers() returns null for a null node. Such a record
now compares by member name instead.
Member values that were null were skipped entirely, which made the
ordering intransitive: {y:1} vs {y:null} and {y:null} vs {y:2} both
compared equal while {y:1} vs {y:2} did not, so a TreeSet of the three
held two elements. A member without a value now sorts before one that
has a value.
Adds test cases for both, plus a regression test for the equals()
NullPointerException fixed in 7ec5d2e.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
EnumLiteral now computes IResolveInfo#resolveInfo as "Enum:literal" for qualified enums, and MPS's ResolveInfoUpdater refreshes the persisted resolve= attribute of every reference from it on save. This is that one-time rewrite, produced by Force Save All so it lands in one place rather than trickling into unrelated commits. Only references into the four qualified enums are affected -- 34 attributes across two test models, no other change in either file. resolve= is a hint for re-resolving a broken reference, not the binding itself, which is by node id, so nothing changes semantically. What it buys is that a reference to Starbucks:large can no longer be auto-resolved onto a different enum's "large". Models elsewhere that reference a qualified enum's literals will take the same rewrite the next time they are saved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merge maintenance/mps20251 into maintenance/mps20261
github-actions
Bot
requested review from
arimer and
jonaskraemer
as code owners
September 1, 2026 10:49
kbirken
previously approved these changes
Sep 1, 2026
kbirken
left a comment
Member
There was a problem hiding this comment.
Cascading merge, no conflicts.
…ch-mpsversion Update dependency com.jetbrains:mps to v2025.1.3 (maintenance/mps20251)
…ch-third-party-minor Update dependency com.mbeddr:platform to v2024.1.26573.0352a59 (maintenance/mps20241)
…dle-9.x Update Gradle to v9.7.1 (maintenance/mps20241)
…rd-party-minor Update third-party-minor to 1.31.+ (maintenance/mps20241)
Merge maintenance/mps20241 into maintenance/mps20251
Merge maintenance/mps20251 into maintenance/mps20261
Fix NullPointerExceptions and contract violations in RecordValue
IFunctionLike: ignore commented out code in unique name check
The IDotTarget refactoring (#1846) moved `EnumIsTarget.literal` up to the new AbstractEnumSingleInTarget and `EnumIsInTarget.selectors` up to the new AbstractEnumInTarget, leaving the old links behind as deprecated `literal_old` and `selectors_old`. Until a model runs migration 006/007 it therefore renders as empty and no longer generates, which forces every downstream project to migrate at once - awkward while feature branches are in flight. Defer the access behind two behavior methods and let the legacy concepts override them: - AbstractEnumSingleInTarget.effectiveLiteral() returns `literal`; EnumIsTarget overrides it to fall back to `literal_old`. - AbstractEnumInTarget.effectiveSelectors() returns `selectors`; EnumIsInTarget overrides it to fall back to `selectors_old`. Everything that used to read the links directly now goes through them: the behavior aspect (renderReadable, reduce), the three reference macros of the genjava generator, and the `is()`/`isIn()` interpreter evaluators. This matters most for `isIn`: it has no template of its own, it is desugared into an `is` chain by the preprocessEnumIsIn mapping script, and that script's `reduce()` returned null for an unmigrated node - so the node did not generate at all. EnumIsTarget and EnumIsInTarget also get their own editors, which add a reference/child cell for the deprecated element, in red and behind a rendering condition that hides it as soon as the deprecated link is empty. Unmigrated models are then legible again: ocean.is(<no literal> not migrated: blue) c.isIn( not migrated: GREEN, BLUE) These two editors duplicate the cells of the abstract editors and are meant to be deleted together with the deprecated links once everyone has migrated. Also fix renderReadable() of EnumIsInTarget/EnumIsNotInTarget, which rendered `isIn([, , ])`: the separator was joined onto each selector's presentation rather than onto the sequence, and resolved to the varargs String.join(CharSequence, CharSequence...) with no elements. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…patibility fix: keep enum 'is' and 'isIn' working on unmigrated models
Merge maintenance/mps20251 into maintenance/mps20261
…numLiteralRef-usability # Conflicts: # CHANGELOG.md
Make EnumLiteral an ISmartReferent, drop QualifierRef
…/mps20261 # Conflicts: # code/languages/org.iets3.opensource/languages/org.iets3.core.expr.toplevel/models/org/iets3/core/expr/toplevel/behavior.mps # code/languages/org.iets3.opensource/languages/org.iets3.core.expr.toplevel/models/org/iets3/core/expr/toplevel/constraints.mps # code/languages/org.iets3.opensource/languages/org.iets3.core.expr.toplevel/models/org/iets3/core/expr/toplevel/editor.mps
Merge maintenance/mps20251 into maintenance/mps20261
Member
|
Master needs to be updated via #1919 with a green build before we can finalize this PR. |
Member
|
This PR is outated: todo: delete branch and create a new merge/PR |
dbinkele
approved these changes
Nov 4, 2026
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.
Merge changes from
maintenance/mps20261tomaster.