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

Compatibility with IntelliJ 2024.2 #61

Open
mkuzmin opened this issue Jul 27, 2024 · 6 comments
Open

Compatibility with IntelliJ 2024.2 #61

mkuzmin opened this issue Jul 27, 2024 · 6 comments

Comments

@mkuzmin
Copy link

mkuzmin commented Jul 27, 2024

Thanks for the plugin!

Please update it to be compatible with 2024.2 Beta.

@skovtunenko
Copy link

This awesome Plugin is not compatible with the latest released version:

Not compatible with the version of your running IDE (IntelliJ IDEA 2024.2.0.1)

@marcospereira
Copy link

This commit solves this issue, but it has not been released yet:

d32ed08#diff-3d103fc7c312a3e136f88e81cef592424b8af2464c468116545c4d22d6edcf19R6

If you clone the repo, build the plugin yourself (./gradlew buildPlugin), and install it from build/distributions, it works as expected.

@Grief
Copy link

Grief commented Aug 24, 2024

@marcospereira I tried the commit you've mentioned as well as HEAD and both are failing in idea 2024.2.0.2 with

java.lang.NullPointerException: Parameter specified as non-null is null: method com.intellij.openapi.fileEditor.TextEditorWithPreview$Layout$Companion.fromId, parameter defaultValue
	at com.intellij.openapi.fileEditor.TextEditorWithPreview$Layout$Companion.fromId(TextEditorWithPreview.kt)
	at com.intellij.openapi.fileEditor.TextEditorWithPreview$Layout.fromId(TextEditorWithPreview.kt)
	at org.jetbrains.plugins.d2.editor.D2FileEditorProvider.readState(D2FileEditorProvider.kt:43)
	at com.intellij.openapi.fileEditor.impl.HistoryEntryKt.parseEntry(HistoryEntry.kt:145)
	at com.intellij.openapi.fileEditor.impl.HistoryEntryKt.access$parseEntry(HistoryEntry.kt:1)
	at com.intellij.openapi.fileEditor.impl.HistoryEntry$Companion.createHeavy(HistoryEntry.kt:44)
	at com.intellij.openapi.fileEditor.impl.EditorHistoryManager.loadState(EditorHistoryManager.kt:302)
	at com.intellij.openapi.fileEditor.impl.EditorHistoryManager.loadState(EditorHistoryManager.kt:31)
	at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:593)
	at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:493)
	at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:160)
	at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:46)
	at com.intellij.serviceContainer.ComponentManagerImpl.initializeService$intellij_platform_serviceContainer(ComponentManagerImpl.kt:651)
	at com.intellij.serviceContainer.LightServiceInstanceSupport$LightServiceInstanceInitializer.createInstance(LightServiceInstanceSupport.kt:56)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1$1.invokeSuspend(LazyInstanceHolder.kt:162)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1$1.invoke(LazyInstanceHolder.kt)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1$1.invoke(LazyInstanceHolder.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1.invokeSuspend(LazyInstanceHolder.kt:160)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1.invoke(LazyInstanceHolder.kt)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1.invoke(LazyInstanceHolder.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:27)
	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:90)
	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:123)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:52)
	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.initialize(LazyInstanceHolder.kt:145)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.access$initialize(LazyInstanceHolder.kt:13)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.tryInitialize(LazyInstanceHolder.kt:135)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance(LazyInstanceHolder.kt:95)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstanceInCallerContext$suspendImpl(LazyInstanceHolder.kt:87)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstanceInCallerContext(LazyInstanceHolder.kt)
	at com.intellij.serviceContainer.ComponentManagerImplKt$doGetOrCreateInstanceBlocking$1.invokeSuspend(ComponentManagerImpl.kt:1568)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:111)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$BuildersKt__BuildersKt(Builders.kt:84)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:52)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at com.intellij.serviceContainer.ComponentManagerImplKt$runBlockingInitialization$1.invoke(ComponentManagerImpl.kt:1686)
	at com.intellij.serviceContainer.ComponentManagerImplKt$runBlockingInitialization$1.invoke(ComponentManagerImpl.kt:1677)
	at com.intellij.openapi.progress.ContextKt.prepareThreadContext(context.kt:85)
	at com.intellij.serviceContainer.ComponentManagerImplKt.runBlockingInitialization(ComponentManagerImpl.kt:1677)
	at com.intellij.serviceContainer.ComponentManagerImplKt.doGetOrCreateInstanceBlocking(ComponentManagerImpl.kt:1567)
	at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1562)
	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:746)
	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:690)
	at com.intellij.openapi.fileEditor.impl.EditorHistoryManager$Companion.getInstance(EditorHistoryManager.kt:392)
	at com.intellij.openapi.fileEditor.impl.UniqueVFilePathBuilderImplKt.createAndCacheBuilders(UniqueVFilePathBuilderImpl.kt:145)
	at com.intellij.openapi.fileEditor.impl.UniqueVFilePathBuilderImplKt.getUniqueVirtualFileNameBuilder(UniqueVFilePathBuilderImpl.kt:104)
	at com.intellij.openapi.fileEditor.impl.UniqueVFilePathBuilderImplKt.getUniqueVirtualFilePath(UniqueVFilePathBuilderImpl.kt:68)
	at com.intellij.openapi.fileEditor.impl.UniqueVFilePathBuilderImplKt.access$getUniqueVirtualFilePath(UniqueVFilePathBuilderImpl.kt:1)
	at com.intellij.openapi.fileEditor.impl.UniqueVFilePathBuilderImpl.getUniqueVirtualFilePathWithinOpenedFileEditors(UniqueVFilePathBuilderImpl.kt:47)
	at com.intellij.openapi.fileEditor.impl.UniqueNameEditorTabTitleProviderKt$getUniqueNameEditorTabTitleAsync$uniqueName$1.invoke(UniqueNameEditorTabTitleProvider.kt:73)
	at com.intellij.openapi.fileEditor.impl.UniqueNameEditorTabTitleProviderKt$getUniqueNameEditorTabTitleAsync$uniqueName$1.invoke(UniqueNameEditorTabTitleProvider.kt:68)
	at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:104)
	at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:15)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:94)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:93)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$2$lambda$1$lambda$0(cancellableReadAction.kt:31)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$2$lambda$1(cancellableReadAction.kt:29)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:155)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:27)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:93)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:77)
	at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:64)
	at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:15)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invokeSuspend(InternalReadAction.kt:43)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:39)
	at com.intellij.openapi.application.rw.PlatformReadWriteActionSupport.executeReadAction(PlatformReadWriteActionSupport.kt:38)
	at com.intellij.openapi.application.ReadWriteActionSupport.executeReadAction$default(ReadWriteActionSupport.kt:15)
	at com.intellij.openapi.application.CoroutinesKt.constrainedReadAction(coroutines.kt:58)
	at com.intellij.openapi.application.CoroutinesKt.readAction(coroutines.kt:25)
	at com.intellij.openapi.fileEditor.impl.UniqueNameEditorTabTitleProviderKt.getUniqueNameEditorTabTitleAsync(UniqueNameEditorTabTitleProvider.kt:68)
	at com.intellij.openapi.fileEditor.impl.EditorTabPresentationUtil.getEditorTabTitleAsync(EditorTabPresentationUtil.kt:29)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImplKt.updateFileNames(FileEditorManagerImpl.kt:2454)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImplKt.access$updateFileNames(FileEditorManagerImpl.kt:1)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImplKt$updateFileNames$1.invokeSuspend(FileEditorManagerImpl.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)

@huyz
Copy link

huyz commented Sep 1, 2024

@marcospereira Thanks, building as you said worked for me on IntelliJ IDEA 2024.2.1

@kpervin
Copy link

kpervin commented Nov 1, 2024

This commit solves this issue, but it has not been released yet:

d32ed08#diff-3d103fc7c312a3e136f88e81cef592424b8af2464c468116545c4d22d6edcf19R6

If you clone the repo, build the plugin yourself (./gradlew buildPlugin), and install it from build/distributions, it works as expected.

Is there an expected release window for this commit?

@qd3v
Copy link

qd3v commented Nov 15, 2024

I was compiling plugin manually for few months (thanks @marcospereira for the hint!). It was failed to start on first time d2 file open, but any next file opened ok (though "theme" var is ignored).
This solution worked until 243 IDEs generation released, now it's not only fails to start, but the editor stop responding completely.
I know nothing about JVM (but Clojure), and JB plugins development, but I think for a pro it should took 30 minutes to fix :) Probably plug's dependencies outdated, IDK...
Thanks for your work!

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

No branches or pull requests

7 participants