Open tpasternak opened 9 months ago
On the other hand, if I move getOrCreateKotlinLibrary
outside invokeAndWait
(EDT), I'm getting this:
java.lang.IllegalStateException: Current thread: Thread[BlazeSyncManager-0,5,main]; expected: Thread[AWT-EventQueue-0,6,main]
at com.intellij.openapi.application.impl.ReadMostlyRWLock.checkWriteThreadAccess(ReadMostlyRWLock.java:315)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.checkForPossibilityOfWriteLock(ReadMostlyRWLock.java:250)
at com.intellij.openapi.application.impl.RwLockHolder.startWrite(RwLockHolder.kt:507)
at com.intellij.openapi.application.impl.RwLockHolder.runWriteAction(RwLockHolder.kt:352)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:881)
at com.intellij.openapi.application.ActionsKt.runWriteAction(actions.kt:16)
at org.jetbrains.kotlin.idea.configuration.KotlinWithLibraryConfigurator.createNewLibrary(KotlinWithLibraryConfigurator.kt:254)
at org.jetbrains.kotlin.idea.configuration.KotlinWithLibraryConfigurator.getOrCreateKotlinLibrary(KotlinWithLibraryConfigurator.kt:139)
at com.google.idea.sdkcompat.kotlin.KotlinCompat.configureModule(KotlinCompat.java:67)
at com.google.idea.blaze.kotlin.sync.BlazeKotlinSyncPlugin$Listener.afterSync(BlazeKotlinSyncPlugin.java:319)
at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.afterSync(SyncPhaseCoordinator.java:788)
at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.finishSync(SyncPhaseCoordinator.java:664)
at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.updateProjectAndFinishSync(SyncPhaseCoordinator.java:592)
at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.runSync(SyncPhaseCoordinator.java:464)
at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.lambda$syncProject$0(SyncPhaseCoordinator.java:259)
at com.google.idea.blaze.base.scope.Scope.push(Scope.java:57)
at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.lambda$syncProject$1(SyncPhaseCoordinator.java:239)
at com.google.idea.blaze.base.async.executor.ProgressiveTaskWithProgressIndicator.lambda$submitTask$0(ProgressiveTaskWithProgressIndicator.java:83)
at com.google.idea.blaze.base.async.executor.ProgressiveTaskWithProgressIndicator.lambda$submitTaskWithResult$4(ProgressiveTaskWithProgressIndicator.java:131)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:76)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:46)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
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:78)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:76)
at com.google.idea.blaze.base.async.executor.ProgressiveTaskWithProgressIndicator.lambda$submitTaskWithResult$5(ProgressiveTaskWithProgressIndicator.java:131)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
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.lang.Thread.run(Thread.java:840)
cc @LeFrosch @ujohnny
Description of the bug:
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
targets
anddirectories
sections in the projectviewtargets
anddirectories
sections include some kotlin filesWhich Intellij IDE are you using? Please provide the specific version.
Build #IU-241.11761.10, built on February 6, 2024
What programming languages and tools are you using? Please provide specific versions.
No response
What Bazel plugin version are you using?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response