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

Not compatible with the latest Buf plugin #232

Closed
spencercjh opened this issue Jan 26, 2024 · 2 comments
Closed

Not compatible with the latest Buf plugin #232

spencercjh opened this issue Jan 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@spencercjh
Copy link

spencercjh commented Jan 26, 2024

I found that plugin Buf supported this non-JetBratins-official Protobuf plugin: bufbuild/intellij-buf#166.

But it seems that there are some compatible problems.

Env:

GoLand 2023.3.2
Build #GO-233.13135.104, built on December 20, 2023
Licensed to Spencer CAI
Subscription is active until February 26, 2024.
Runtime version: 17.0.9+7-b1087.9 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Registry:
  debugger.new.tool.window.layout=$HUAWEI$
  ide.completion.variant.limit=500
  suggest.all.run.configurations.from.context=TRUE
  go.run.processes.with.pty=false
Non-Bundled Plugins:
  com.andrey4623.rainbowcsv (2.0.2)
  codes.rudolph.idea.cfg (0.3.1)
  com.github.leomillon.uuidgenerator (4.5.1)
  com.markskelton.one-dark-theme (5.9.0)
  net.sjrx.intellij.plugins.systemdunitfiles (223.231217.132)
  com.github.copilot (1.4.12.4386)
  github.cweijan.test-theme (1.6)
  Key Promoter X (2023.3.0)
  lermitage.intellij.extra.icons (2024.2.2)
  some.awesome (1.15)
  com.nasller.CodeGlancePro (1.7.8)
  com.intellij.mermaid (0.0.19+IJ.232)
  org.toml.lang (233.13135.67)
  com.intellij.plugins.macoskeymap (232.6095.10)
  izhangzhihao.rainbow.brackets (2024.1.0-233)
  com.samvtran.plugins.macosforallkeymap (2.0.0)
  com.intellij.kubernetes (233.13135.104)
  cat.dcat.jbplug.mactabbing (1.1.0)
  com.intellij.grazie.pro (0.3.275)
  org.asciidoctor.intellij.asciidoc (0.41.6)
  net.seesharpsoft.intellij.plugins.csv (3.2.3-233)
  zielu.gittoolbox (500.1.8+222)
  mobi.hsz.idea.gitignore (4.5.2)
  ru.adelf.idea.dotenv (2023.3)
  com.ypwang.plugin.go-linter (1.6.6)
  io.kanro.idea.plugin.protobuf (1.7.50)
  com.github.bufbuild.intellij (0.3.0)
  org.nik.presentation-assistant (1.0.10)
  cn.yiiguxing.plugin.translate (3.5.6)

Error logs:

com.intellij.diagnostic.PluginException: Failed to build stub tree for gogo.proto [Plugin: io.kanro.idea.plugin.protobuf]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:89)
	at com.intellij.psi.stubs.StubTreeBuilder.handleStubBuilderException(StubTreeBuilder.java:105)
	at com.intellij.psi.stubs.StubTreeBuilder.lambda$buildStubTree$3(StubTreeBuilder.java:142)
	at com.intellij.psi.impl.PsiManagerImpl.runInBatchFilesMode(PsiManagerImpl.java:462)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:132)
	at com.intellij.psi.stubs.StubUpdatingIndex$2.computeValue(StubUpdatingIndex.java:198)
	at com.intellij.psi.stubs.StubUpdatingIndex$2.computeValue(StubUpdatingIndex.java:176)
	at com.intellij.psi.stubs.StubUpdatingIndex$2.computeValue(StubUpdatingIndex.java:145)
	at com.intellij.util.indexing.SingleEntryIndexer.map(SingleEntryIndexer.java:30)
	at com.intellij.util.indexing.SingleEntryIndexer.map(SingleEntryIndexer.java:19)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapByIndexer(MapReduceIndex.java:318)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:309)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInputAndPrepareUpdate(MapReduceIndex.java:254)
	at com.intellij.psi.stubs.StubUpdatingIndexStorage.mapInputAndPrepareUpdate(StubUpdatingIndexStorage.java:62)
	at com.intellij.psi.stubs.StubUpdatingIndexStorage.mapInputAndPrepareUpdate(StubUpdatingIndexStorage.java:22)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.updateBaseIndex(CompositeInvertedIndexBase.java:283)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:63)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:29)
	at com.intellij.util.indexing.FileBasedIndexImpl.createSingleIndexValueApplier(FileBasedIndexImpl.java:1571)
	at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$23(FileBasedIndexImpl.java:1444)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyWithProvidedValueIn(FileTypeManagerImpl.java:678)
	at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1397)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1371)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexOneFileOfJob$5(IndexUpdateRunner.java:492)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:840)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:872)
	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.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:111)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:108)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:73)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:567)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.executeSynchronously(NonBlockingReadActionImpl.java:492)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.executeSynchronously(NonBlockingReadActionImpl.java:220)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexOneFileOfJob(IndexUpdateRunner.java:496)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexJobsFairly$4(IndexUpdateRunner.java:375)
	at com.intellij.openapi.progress.impl.ProgressSuspender.executeNonSuspendableSection(ProgressSuspender.java:90)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexJobsFairly(IndexUpdateRunner.java:378)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$doIndexFiles$3(IndexUpdateRunner.java:309)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
	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)
Caused by: com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
	at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:67)
	at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:821)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:769)
	at com.intellij.util.indexing.FileBasedIndexEx.processAllKeys(FileBasedIndexEx.java:149)
	at com.intellij.util.indexing.FileBasedIndexImpl.processAllKeys(FileBasedIndexImpl.java:816)
	at com.intellij.util.indexing.FileBasedIndexEx.processAllKeys(FileBasedIndexEx.java:135)
	at com.intellij.util.indexing.FileBasedIndexEx.getAllKeys(FileBasedIndexEx.java:129)
	at build.buf.intellij.index.BufModuleIndex$Companion.getAllProjectModules(BufModuleIndex.kt:32)
	at build.buf.intellij.vendor.kanro.BufProtoRootProvider.roots(BufProtoFileResolver.kt:41)
	at io.kanro.idea.plugin.protobuf.lang.root.ProtobufRootResolver$getAvailableRoots$1.invoke(ProtobufRootResolver.kt:37)
	at io.kanro.idea.plugin.protobuf.lang.root.ProtobufRootResolver$getAvailableRoots$1.invoke(ProtobufRootResolver.kt:36)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:311)
	at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
	at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:816)
	at io.kanro.idea.plugin.protobuf.lang.root.ProtobufRootResolver.distinctRoots(ProtobufRootResolver.kt:30)
	at io.kanro.idea.plugin.protobuf.lang.root.ProtobufRootResolver.getAvailableRoots(ProtobufRootResolver.kt:38)
	at io.kanro.idea.plugin.protobuf.lang.root.ProtobufRootResolver.findFile(ProtobufRootResolver.kt:55)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufImportReference$Companion.resolve(ProtobufImportReference.kt:95)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufImportReference$Resolver.resolve(ProtobufImportReference.kt:28)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufImportReference$Resolver.resolve(ProtobufImportReference.kt:23)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$5(ResolveCache.java:268)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:234)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:213)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:268)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufImportReference.resolve(ProtobufImportReference.kt:34)
	at io.kanro.idea.plugin.protobuf.lang.psi.ExtensionKt.resolve(Extension.kt:168)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufSymbolResolver.resolveRelatively(ProtobufSymbolResolver.kt:66)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufTypeNameReference$Resolver.resolve(ProtobufTypeNameReference.kt:65)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufTypeNameReference$Resolver.resolve(ProtobufTypeNameReference.kt:45)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$5(ResolveCache.java:268)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:234)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:213)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:268)
	at io.kanro.idea.plugin.protobuf.lang.reference.ProtobufTypeNameReference.resolve(ProtobufTypeNameReference.kt:83)
	at io.kanro.idea.plugin.protobuf.lang.psi.mixin.ProtobufExtendDefinitionMixin.stubData(ProtobufMessageDefinitionMixin.kt:130)
	at io.kanro.idea.plugin.protobuf.lang.psi.stub.type.ProtobufStubTypeBase.createStub(ProtobufStubTypeBase.kt:46)
	at io.kanro.idea.plugin.protobuf.lang.psi.stub.type.ProtobufStubTypeBase.createStub(ProtobufStubTypeBase.kt:19)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.createStub(DefaultStubBuilder.java:81)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:58)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:53)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:31)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:22)
	at com.intellij.psi.stubs.StubTreeBuilder.lambda$buildStubTree$1(StubTreeBuilder.java:142)
	at com.intellij.psi.stubs.StubTreeBuilder.handleStubBuilderException(StubTreeBuilder.java:98)
	... 62 more

@devkanro
Copy link
Owner

Can you provide a sample project that reproduces this bug?

@devkanro devkanro added the bug Something isn't working label Feb 17, 2024
@spencercjh
Copy link
Author

can't reproduce, close it.

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

No branches or pull requests

2 participants