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

Opening file leads to exception with IDE stuck with Analyzing... of file #7171

Open
rastislav-vcrs opened this issue Dec 12, 2024 · 3 comments
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin type: bug

Comments

@rastislav-vcrs
Copy link

Description of the bug:

Sync fails at the beginning right after project opening or when any file is opened with following error:

com.google.idea.blaze.base.qsync.NotSupportedWithQuerySyncException: getTargetMap
	at com.google.idea.blaze.base.qsync.QuerySyncProjectData.getTargetMap(QuerySyncProjectData.java:136)
	at com.google.idea.blaze.golang.resolve.BlazeGoPackageFactory.buildFileToImportPathMap(BlazeGoPackageFactory.java:70)
	at com.google.idea.blaze.base.sync.SyncCache.get(SyncCache.java:61)
	at com.google.idea.blaze.golang.resolve.BlazeGoPackageFactory.getFileToImportPathMap(BlazeGoPackageFactory.java:65)
	at com.google.idea.blaze.golang.resolve.BlazeGoPackageFactory.createPackage(BlazeGoPackageFactory.java:54)
	at com.goide.psi.impl.GoPackage.of(GoPackage.java:79)
	at com.goide.psi.GoFile.getImportPath(GoFile.java:73)
	at com.goide.microservices.GoHttpServerDeclarationPatternsKt.fullyQualifiedName(GoHttpServerDeclarationPatterns.kt:85)
	at com.goide.microservices.GoHttpServerDeclarationPatternsKt.getOrComputeFullyQualifiedName$lambda$0(GoHttpServerDeclarationPatterns.kt:112)
	at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:173)
	at com.intellij.psi.impl.PsiCachedValueImpl$Direct.doCompute(PsiCachedValueImpl.kt:77)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:236)
	at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:236)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:237)
	at com.intellij.psi.impl.PsiCachedValueImpl$Direct.getValue(PsiCachedValueImpl.kt:81)
	at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:170)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
	at com.goide.microservices.GoHttpServerDeclarationPatternsKt.getOrComputeFullyQualifiedName(GoHttpServerDeclarationPatterns.kt:111)
	at com.goide.microservices.GoHttpServerDeclarationPatternsKt.access$getOrComputeFullyQualifiedName(GoHttpServerDeclarationPatterns.kt:1)
	at com.goide.microservices.GoHttpServerDeclarationPatternsKt$functionCallArgumentByIndex$1.accepts(GoHttpServerDeclarationPatterns.kt:61)
	at com.goide.microservices.GoHttpServerDeclarationPatternsKt$functionCallArgumentByIndex$1.accepts(GoHttpServerDeclarationPatterns.kt:57)
	at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:55)
	at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:37)
	at com.goide.microservices.GoUrlPathInlayLanguagesProvider.getPotentialElementsWithHintsProviders(GoUrlPathInlayLanguagesProvider.kt:13)
	at com.intellij.microservices.url.inlay.UrlPathInlayHintsProvider$Companion.inlaysInElement$intellij_microservices(UrlPathInlayHintsProvider.kt:134)
	at com.intellij.microservices.url.inlay.UrlPathInlayHintsProvider$getCollectorFor$1$collect$1.invoke(UrlPathInlayHintsProvider.kt:37)
	at com.intellij.microservices.url.inlay.UrlPathInlayHintsProvider$getCollectorFor$1$collect$1.invoke(UrlPathInlayHintsProvider.kt:36)
	at com.intellij.microservices.url.references.UrlPathContextKt.forbidExpensiveUrlContext(UrlPathContext.kt:248)
	at com.intellij.microservices.url.inlay.UrlPathInlayHintsProvider$getCollectorFor$1.collect(UrlPathInlayHintsProvider.kt:36)
	at com.intellij.codeInsight.hints.CollectorWithSettings.collectHints(InlayHintsUtils.kt:97)
	at com.intellij.codeInsight.hints.InlayHintsPass.doCollectInformation$lambda$1(InlayHintsPass.kt:60)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:139)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
	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.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:96)
	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.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:108)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:89)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:759)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)

Disabling query sync does not change the outcome.

Which category does this issue belong to?

Intellij

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Create a project with golan, open file.

Which Intellij IDE are you using? Please provide the specific version.

IntelliJ IDEA 2024.2.0.1 (Ultimate Edition) Build #IU-242.20224.387

What programming languages and tools are you using? Please provide specific versions.

Go project with bzlmod, bazel 7.4.1

What Bazel plugin version are you using?

2024.11.19.0.2-api-version-242

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

IntelliJ IDEA 2024.2.0.1 (Ultimate Edition)
Build #IU-242.20224.387, built on August 13, 2024

....

Registry:
  ide.index.image.max.size=0
  ide.experimental.ui=true
Non-Bundled Plugins:
  org.intellij.plugins.hcl (242.20224.159)
  org.jetbrains.plugins.go-template (242.20224.155)
  com.intellij.ideolog (242.20224.428)
  name.kropp.intellij.makefile (242.20224.155)
  org.jetbrains.plugins.go (242.20224.300)
  com.google.idea.bazel.ijwb (2024.11.19.0.2-api-version-242)
Kotlin: 242.20224.387-IJ
Current Desktop: GNOME
@tpasternak
Copy link
Contributor

#7031

@tpasternak
Copy link
Contributor

Unfortunately we don't support QS for go

@rastislav-vcrs
Copy link
Author

I have QS dissabled, but that does not change the outcome. So not supporting it is OK, breaking IDE by not supporting it is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin type: bug
Projects
Status: Untriaged
Development

No branches or pull requests

3 participants