Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade IETS3.opensource to MPS 2022.2 #674

Merged
merged 14 commits into from Jun 15, 2023
Merged

Conversation

HeikoBecker
Copy link
Collaborator

This PR applies the necessary migratins to update IETS3.opensource to MPS 2022.2. A maintenance branch for 2021.3 has been created.

This disables the operation type rule for the absolute value operation.
The operand needs to be of non-null in the latest MPS versions in operator
rules and this was causing problems because we used default null for unary
operations.
The cast was added to fix an inference bug and is not needed anymore.
Copy link
Member

@arimer arimer left a comment

Choose a reason for hiding this comment

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

Thanks for the effort 💪🏼

I think we should address/clarify the following findings before merging:

Findings

  • There are still some pending migrations for the languages that are not part of the gradle build for the languages: trace.test and component.attribute
    grafik
  • Why do we need to bump up the gradle version number?
  • Can you maybe explain why we needed to change the TS implementation to use Realtype instead of null?
  • several findings in the build.gradle file that need attention (see inline comments)

Stacktraces

There is an exception poping up all the time, which is cause from some mbeddr code. Fixing it would be required in the correct repo, however I am still listing it here. It does not need to be fixed before the merge:

Exception on a tool init: Tool com.mbeddr.doc.aspect.ui.plugin.TabbedDocViewer_Tool

java.lang.IllegalStateException: You must not register toolwindow programmatically so early. Rework code or use ToolWindowManager.invokeLater
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.getToolWindowPaneIfInitialized(ToolWindowManagerImpl.kt:500)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow(ToolWindowManagerImpl.kt:931)
	at com.intellij.openapi.wm.ToolWindowManager.registerToolWindow(ToolWindowManager.kt:98)
	at jetbrains.mps.ide.tools.BaseTool.register(BaseTool.java:268)
	at jetbrains.mps.ide.tools.BaseTool.getToolWindow(BaseTool.java:198)
	at jetbrains.mps.ide.tools.BaseTool.toolIsOpened(BaseTool.java:101)
	at com.mbeddr.doc.aspect.ui.plugin.TabbedDocViewer_Tool.initializeTabsForSelection(TabbedDocViewer_Tool.java:80)
	at com.mbeddr.doc.aspect.ui.plugin.TabbedDocViewer_Tool.init(TabbedDocViewer_Tool.java:68)
	at jetbrains.mps.plugins.projectplugins.BaseProjectPlugin.registerPrefsAndTools(BaseProjectPlugin.java:130)
	at jetbrains.mps.plugins.projectplugins.BaseProjectPlugin.init(BaseProjectPlugin.java:97)
	at jetbrains.mps.plugins.projectplugins.ProjectPluginManager.createPlugin(ProjectPluginManager.java:159)
	at jetbrains.mps.plugins.projectplugins.ProjectPluginManager.createPlugin(ProjectPluginManager.java:54)
	at jetbrains.mps.plugins.BasePluginManager.createPluginChecked(BasePluginManager.java:153)
	at jetbrains.mps.plugins.BasePluginManager.createPlugins(BasePluginManager.java:143)
	at jetbrains.mps.plugins.BasePluginManager.loadPlugins(BasePluginManager.java:73)
	at jetbrains.mps.plugins.PluginLoaderRegistry.loadContributors(PluginLoaderRegistry.java:217)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.addContributors(PluginLoaderRegistry.java:522)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.lambda$update$2(PluginLoaderRegistry.java:499)
	at jetbrains.mps.classloading.ClassLoaderManager.lambda$runTransaction$2(ClassLoaderManager.java:314)
	at jetbrains.mps.classloading.ClassLoaderManager.runTransaction(ClassLoaderManager.java:322)
	at jetbrains.mps.classloading.ClassLoaderManager.runTransaction(ClassLoaderManager.java:313)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.lambda$update$3(PluginLoaderRegistry.java:468)
	at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:98)
	at jetbrains.mps.smodel.ActionDispatcher.lambda$wrap$0(ActionDispatcher.java:135)
	at jetbrains.mps.smodel.LockRunnable.run(LockRunnable.java:60)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:915)
	at jetbrains.mps.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:84)
	at jetbrains.mps.smodel.ModelAccessBase.runReadAction(ModelAccessBase.java:56)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.update(PluginLoaderRegistry.java:467)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.lambda$run$1(PluginLoaderRegistry.java:453)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:513)
	at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:95)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:75)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:118)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

build.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
@arimer
Copy link
Member

arimer commented Jun 15, 2023

@HeikoBecker I've executed the pending migration and I pushed the results.

@HeikoBecker
Copy link
Collaborator Author

@arimer Thanks.

For the type system change:

operator rules now check that both arguments are non-null. I noticed this because sqrt and abs expressions were raising exceptions in the type checking.

Therefore I replaced the default null for the type of the second argument (which is non-existent for these unary ops) with a default RealType.

@HeikoBecker HeikoBecker requested a review from arimer June 15, 2023 09:04
Copy link
Member

@arimer arimer left a comment

Choose a reason for hiding this comment

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

Thanks for the changes 💪🏼

@HeikoBecker HeikoBecker merged commit b21ab2f into master Jun 15, 2023
1 check passed
@HeikoBecker HeikoBecker deleted the feature/upgrade_mps20222 branch June 15, 2023 10:00
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.

None yet

2 participants