Skip to content

Bugfix/mps2026 leftover fixes - #57

Open
mfsoliveira wants to merge 4 commits into
DSLFoundry:mainfrom
mfsoliveira:bugfix/mps2026_leftover_fixes
Open

mfsoliveira wants to merge 4 commits into
DSLFoundry:mainfrom
mfsoliveira:bugfix/mps2026_leftover_fixes

Conversation

@mfsoliveira

Copy link
Copy Markdown
Contributor

Summary

Cleans up leftovers from the migration of mbeddr.cpp to MPS 2026.1: a stale version in the MPS build script and uses of APIs that MPS or mbeddr core have deprecated or moved. One commit per fix; no behaviour change intended.

Changes

  • Build script version — major.version/minor.version (node url) in com.mbeddr.cpp.build still said 2023.2. Bumped to 2026.1 to match gradle.properties. Gradle overrides the version for CI artifacts; builds started from the MPS IDE were labelled 2023.2-0000.
  • getContributedLocalVariables — ClassConstructorSignature (node url) and CatchBlock (node url) now override mbeddr's getContributedLocalVariables(node<>) instead of the deprecated no-argument variant. The dead super<> call in ClassConstructorSignature (result discarded, default returns an empty sequence) is removed.
  • Template function scopes — TemplateFunctionCall_Constraints (node url) and RegularFunctionCall_Constraints (node url) call visibleContentsOfTypeAsSequence(concept/…/) instead of the deprecated visibleContentsOfType(conceptNode/…/). The ListScope.forResolvableElements wrapper is unchanged.
  • Obsolete concept method calls — three calls (GlobalVarDecCPP_TextGen, typeof_QualifiedMethodCall, typeof_TemplateQualifiedMethodCall) still used the lang.smodel Node_ConceptMethodCall; updated to lang.behavior with the MPS quickfix.

Not changed (needs mbeddr core)

  • ICallLike.getActualsLink() still returns node<LinkDeclaration>, so its 8 implementations keep the deprecated linkNode/<role>/.
  • IVisibleElementProvider.visibleContentsOfType(conceptNode<>) is deprecated but still abstract, so the overrides in ClassDeclaration and CPPImplementationModule stay.

Verification

  • Model checker: no new errors in the touched modules; the targeted deprecation warnings are gone.
  • build_module: base, exceptions, expressions, templates and test.ts.com.mbeddr.cpp build.
  • test.ts.com.mbeddr.cpp: 221/221 tests pass (in-process in MPS 2026.1).
  • Native test.ex: verified manually in the terminal and by CI on this PR (gradle.yml, Linux g++).

🤖 Generated with Claude Code

mfsoliveira and others added 4 commits November 22, 2026 21:55
The com.mbeddr.cpp.build script still declared major.version=2023 and
minor.version=2, left over from the 2023.2 migration. Gradle overrides
version/mbeddr.cpp.version for CI artifacts, but a build started from
the MPS IDE still labelled its output 2023.2-0000. Align the defaults
with gradle.properties (mbeddrCppVersion = 2026.1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mbeddr core deprecated the no-argument
ILocalVarScopeProvider.getContributedLocalVariables() in favour of the
getContributedLocalVariables(node<> node) overload, which is what
getLocalVarScope() calls. This change move both overrides to the node
overload and deleted the supper call because it was a dead code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The function reference scopes of TemplateFunctionCall and
RegularFunctionCall still called the deprecated
IVisibleElementProvider.visibleContentsOfType(conceptNode<>) with
deprecated conceptNode/.../ literals. Switch them to the replacement
visibleContentsOfTypeAsSequence(concept<>) with concept/.../ literals,
keeping the ListScope.forResolvableElements wrapper unchanged.

The model also gains the jetbrains.mps.lang.behavior used-language entry
it was missing for its existing concept method calls.

The remaining visibleContentsOfType(conceptNode<>) overrides in
ClassDeclaration and CPPImplementationModule stay: mbeddr core still
declares that method abstract, so every provider must implement it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three behavior method calls still used the obsolete
jetbrains.mps.lang.smodel Node_ConceptMethodCall, which MPS moved to
jetbrains.mps.lang.behavior (ObsoleteConceptMethodCallCheck):
GlobalVarDecCPP_TextGen, typeof_QualifiedMethodCall and
typeof_TemplateQualifiedMethodCall. Applied the MPS quickfix "Update
obsolete concept method call"; targets and arguments are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@eugenschindler eugenschindler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against the MPS-extensions coding standards. No blocking findings.

Semantics I checked against the mbeddr 2026.1 dependency

  • getContributedLocalVariables(node): getLocalVarScope calls the node overload, and its default delegates to the no-arg one. Nothing else calls the no-arg variant, so overriding the node overload preserves behaviour. Removing the super<> call is correct: its result was discarded and the default returns an empty sequence.
  • visibleContentsOfTypeAsSequence(concept): this goes through the virtual visibleContentsOfType(concept<>), then visibleContentsOfType(conceptNode<>). The overrides in ClassDeclaration and CPPImplementationModule are still reached. Satisfies 1.1 and 3.7.
  • Concept method call quickfix and registry cleanup look fine (3.4). Adding the jetbrains.mps.lang.behavior used-language to the templates constraints model fixes a genuinely missing entry.
  • CI is green.

Nits (non-blocking)

  1. (3.5) In both getContributedLocalVariables overrides, the unchanged return-type nodes got new IDs (6ddXmWdIrFt→4YOx14cWljO, 1OcdQnyTC27→4YOx14cWlk2). Keeping the IDs would give a cleaner diff and history.
  2. The scope now comes via NamedElementsScope.getAvailableElements(null) and is then wrapped in ListScope.forResolvableElements again. The result is equivalent, but the outer wrap is redundant. Optional follow-up.
  3. The node links in the PR description point to 127.0.0.1:63320, so other reviewers can't open them. Please use model/node names instead.
  4. Commit 4cd7309 message has typos ("This change move…", "supper call").
  5. The PR title is the branch name. Something like "Clean up MPS 2026.1 migration leftovers" would read better in the history.
  6. No new tests. The changed scopes are covered only indirectly, through the existing error checks in the trycatch, constructor and templates NodesTestCases. That's acceptable for a no-behaviour-change refactoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants