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

Unable to upgrade to 4.0.0 Bloc plugin on Intellij #4166

Closed
DanMossa opened this issue May 9, 2024 · 5 comments · Fixed by #4168
Closed

Unable to upgrade to 4.0.0 Bloc plugin on Intellij #4166

DanMossa opened this issue May 9, 2024 · 5 comments · Fixed by #4168
Assignees
Labels
bug Something isn't working extension This issue relates to bloc extensions

Comments

@DanMossa
Copy link

DanMossa commented May 9, 2024

Description
Same issue as
#3938 (comment)

Steps To Reproduce
I'm hovering over any code, and trying to trigger an auto complete.

Screenshots

Exceptions occurred on invoking the intention 'Wrap with BlocBuilder' (class com.bloc.intellij_generator_plugin.intention_action.BlocWrapWithBlocBuilderIntentionAction) on a copy of the file.

java.lang.IllegalStateException: Must not start write action from within read action in the other thread - deadlock is coming
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:113)
	at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:338)
	at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:326)
	at com.bloc.intellij_generator_plugin.intention_action.BlocWrapWithIntentionAction.invoke(BlocWrapWithIntentionAction.kt:60)
	at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:27)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:80)
	at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:251)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.generateFallbackDiff$lambda$4$lambda$3(IntentionPreviewComputable.kt:198)
	at com.intellij.psi.impl.source.PostprocessReformattingAspectImpl.lambda$postponeFormattingInside$2(PostprocessReformattingAspectImpl.java:139)
	at com.intellij.psi.impl.source.PostprocessReformattingAspectImpl.postponeFormattingInside(PostprocessReformattingAspectImpl.java:148)
	at com.intellij.psi.impl.source.PostprocessReformattingAspectImpl.postponeFormattingInside(PostprocessReformattingAspectImpl.java:138)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.generateFallbackDiff$lambda$4(IntentionPreviewComputable.kt:198)
	at com.intellij.codeInsight.intention.preview.IntentionPreviewUtils.previewSession(IntentionPreviewUtils.java:123)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.generateFallbackDiff(IntentionPreviewComputable.kt:196)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.access$generateFallbackDiff(IntentionPreviewComputable.kt:38)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable$invokePreview$2.invoke(IntentionPreviewComputable.kt:137)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable$invokePreview$2.invoke(IntentionPreviewComputable.kt:137)
	at com.intellij.model.SideEffectGuard$Companion.computeWithAllowedSideEffectsBlocking(SideEffectGuard.kt:42)
	at com.intellij.model.SideEffectGuard$Companion.computeWithoutSideEffects(SideEffectGuard.kt:27)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.invokePreview(IntentionPreviewComputable.kt:137)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.generatePreview(IntentionPreviewComputable.kt:90)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.tryCreateDiffContent(IntentionPreviewComputable.kt:66)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.call(IntentionPreviewComputable.kt:44)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.call(IntentionPreviewComputable.kt:38)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:851)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:883)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:604)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:567)
	at com.intellij.openapi.application.impl.RwLockHolder.tryRunReadAction(RwLockHolder.kt:310)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:958)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:93)
	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.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:138)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:100)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:100)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:135)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:93)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:567)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:466)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:481)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

Additional Context
I'm using Bloc plugin version 3.4.0
But there's no option to update to 4.0.0 which I believe has the fix?

@DanMossa DanMossa added the bug Something isn't working label May 9, 2024
@felangel
Copy link
Owner

Hi @DanMossa 👋
Thanks for opening an issue!

Can you provide a bit more information about why you're not able to upgrade to 4.0.0? It's available on the marketplace at https://plugins.jetbrains.com/plugin/12129-bloc/versions/stable/503090

@felangel felangel self-assigned this May 10, 2024
@felangel felangel added waiting for response Waiting for follow up extension This issue relates to bloc extensions labels May 10, 2024
@DanMossa
Copy link
Author

Hi @DanMossa 👋 Thanks for opening an issue!

Can you provide a bit more information about why you're not able to upgrade to 4.0.0? It's available on the marketplace at plugins.jetbrains.com/plugin/12129-bloc/versions/stable/503090

Ah! I believe it's because I'm using IntelliJ IDEA 2024.1 (Ultimate Edition)
image

Would it be possible for you to allow this version of IntelliJ?

@felangel
Copy link
Owner

Ah thanks! Yeah I’ll try to expand the supported versions later today, apologies for the inconvenience!

@felangel felangel removed the waiting for response Waiting for follow up label May 10, 2024
@DanMossa
Copy link
Author

All good! I appreciate it!

@felangel
Copy link
Owner

Just created v4.0.1 and it should be available in the next day or so (it's pending review atm).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension This issue relates to bloc extensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants