-
Notifications
You must be signed in to change notification settings - Fork 305
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
Fixes issues when bazel is used alongside cmake #6770
Conversation
CC @TomatorCZ |
@TomatorCZ PSW for bazel seems broken in 243 not sure what causes this. As far as I can tell |
@tpasternak The normal banner is a bit different and only checks if the current project is bazel or not. Also it should be possible to dismiss the default banner. |
Sorry I didn't get it |
A required fix in CLion is on master - waiting for next EAP due to API changes. |
3044283
to
8c5f7f8
Compare
LGTM |
unregisterGenericProvider(project) | ||
|
||
if (!providerRegistered) { | ||
registerSpecificProvider(); | ||
} | ||
providerRegistered = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use application service for this thing?
return false | ||
} | ||
|
||
if (!isProjectAwareFile(file, project) && file.fileType !== BuildFileType.INSTANCE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this one we need to wrap with read action
com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); If you access or modify model on EDT consider wrapping your code in WriteIntentReadAction or ReadAction; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#498,DefaultDispatcher-worker-42,5,main] 48855694 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#57,AWT-EventQueue-0,6,main] 1293053156
at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:218)
at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:155)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:921)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.ensureIsUpToDate(WorkspaceFileIndexDataImpl.kt:157)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.getFileInfo(WorkspaceFileIndexDataImpl.kt:98)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:267)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.isExcluded(ProjectFileIndexImpl.java:67)
at com.jetbrains.cidr.project.ui.ProjectStatusHelperKt.isProjectAwareFile(ProjectStatusHelper.kt:18)
at com.google.idea.blaze.clwb.CLionNotificationProvider.collectFixes(CLionNotificationProvider.kt:46)
at com.jetbrains.cidr.project.ui.popup.PopupService$Companion$collectFixes$2$1$1.invokeSuspend(PopupService.kt:34)
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed by 8c5f7f8?
This reverts commit c2906ad. Let's wait with this until we drop 241. Don't want to introduce sdk compat for tests.
Description of this change
If the file already belongs to a cmake project the bazel import fix is also shown by the PSW and if the project is reopend some classes are registered twice.