Closed ilanKeshet closed 2 months ago
apparently they come in pairs of
java.lang.RuntimeException: com.intellij.execution.filters.CompositeFilter$ApplyFilterException: Error while applying com.jetbrains.python.run.PythonTracebackFilter@2d87e61c to 'File "<decorator-gen-4>", line 2, in _handle_select
'
at com.intellij.execution.impl.AsyncFilterRunner.isQuick(AsyncFilterRunner.java:85)
at com.intellij.execution.impl.AsyncFilterRunner.highlightHyperlinks(AsyncFilterRunner.java:64)
at com.intellij.execution.impl.EditorHyperlinkSupport.highlightHyperlinksLater(EditorHyperlinkSupport.java:332)
at com.intellij.execution.impl.ConsoleViewImpl.highlightHyperlinksAndFoldings(ConsoleViewImpl.java:945)
at com.intellij.execution.impl.ConsoleViewImpl.flushDeferredText(ConsoleViewImpl.java:754)
at com.intellij.execution.impl.ConsoleViewImpl$FlushRunnable.doRun(ConsoleViewImpl.java:1608)
at com.intellij.execution.impl.ConsoleViewImpl$FlushRunnable.run(ConsoleViewImpl.java:1604)
at com.intellij.util.Alarm$Request.lambda$runSafely$0(Alarm.java:371)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
at com.intellij.util.Alarm$Request.lambda$runSafely$1(Alarm.java:369)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:255)
at com.intellij.util.Alarm$Request.runSafely(Alarm.java:368)
at com.intellij.util.Alarm$Request.run(Alarm.java:356)
at com.intellij.util.concurrency.Propagation.contextAwareCallable$lambda$2(propagation.kt:383)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:836)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:425)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:78)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:696)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:590)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:590)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$10(IdeEventQueue.kt:351)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: com.intellij.execution.filters.CompositeFilter$ApplyFilterException: Error while applying com.jetbrains.python.run.PythonTracebackFilter@2d87e61c to 'File "<decorator-gen-4>", line 2, in _handle_select
'
at com.intellij.execution.filters.CompositeFilter.applyFilter(CompositeFilter.java:73)
at com.intellij.execution.impl.AsyncFilterRunner$HighlighterJob.analyzeLine(AsyncFilterRunner.java:230)
at com.intellij.execution.impl.AsyncFilterRunner$HighlighterJob.analyzeNextLine(AsyncFilterRunner.java:219)
at com.intellij.execution.impl.AsyncFilterRunner.runTasks(AsyncFilterRunner.java:149)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
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.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
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:96)
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:96)
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 com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:212)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.NumberFormatException: For input string: "<decorator-gen-4>"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:662)
at java.base/java.lang.Integer.parseInt(Integer.java:778)
at com.google.idea.blaze.python.run.BlazePyTracebackParser.findLinkInTrace(BlazePyTracebackParser.java:38)
at com.jetbrains.python.traceBackParsers.TraceBackParserAdapter.findLinkInTrace(TraceBackParserAdapter.java:41)
at com.jetbrains.python.run.PythonTracebackFilter.applyFilter(PythonTracebackFilter.kt:29)
at com.intellij.execution.filters.CompositeFilter.applyFilter(CompositeFilter.java:67)
... 41 more
and
com.intellij.execution.filters.CompositeFilter$ApplyFilterException: Error while applying com.jetbrains.python.run.PythonTracebackFilter@9278cab to 'File "<decorator-gen-4>", line 2, in _handle_select
'
at com.intellij.execution.filters.CompositeFilter.applyFilter(CompositeFilter.java:73)
at com.intellij.execution.impl.AsyncFilterRunner$HighlighterJob.analyzeLine(AsyncFilterRunner.java:230)
at com.intellij.execution.impl.AsyncFilterRunner$HighlighterJob.analyzeNextLine(AsyncFilterRunner.java:219)
at com.intellij.execution.impl.AsyncFilterRunner.runTasks(AsyncFilterRunner.java:149)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
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.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
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:96)
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:96)
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 com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:212)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.NumberFormatException: For input string: "<decorator-gen-4>"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:662)
at java.base/java.lang.Integer.parseInt(Integer.java:778)
at com.google.idea.blaze.python.run.BlazePyTracebackParser.findLinkInTrace(BlazePyTracebackParser.java:38)
at com.jetbrains.python.traceBackParsers.TraceBackParserAdapter.findLinkInTrace(TraceBackParserAdapter.java:41)
at com.jetbrains.python.run.PythonTracebackFilter.applyFilter(PythonTracebackFilter.kt:29)
at com.intellij.execution.filters.CompositeFilter.applyFilter(CompositeFilter.java:67)
... 41 more
Correction to the above, I now realize that the error only reproduces after I execute tests.
Switching to to the terminal to execute, the command below and switch back to the IDE to reproduce.
bazel test --test_output=streamed --curses=no --sandbox_default_allow_network //workspace/some/path/with/tests:some_test --test_arg="-sv" --test_arg=-- --test_arg="--testloglevel=INFO
Hi @tpasternak
The issue still reproduces at 2024.08.27.0.1-api-version-242
NVM, noticed it's only getting fixed at https://github.com/bazelbuild/intellij/releases/tag/v2024.09.10-rc-1
Yes, you can try beta
Out of curiosity @ilanKeshet what's the thing that you miss most when it comes to python support in the plugin?
Many thanks @tpasternak 🙏
Thank you for the feedback! You can also try the new plugin, however python is still in available behind feature flag / with caveats
state
https://github.com/JetBrains/hirschgarten/blob/main/docs/feature_matrix.md
- Having the IDE recognize the python pypi dependencies which we manage with rules_python. If sync a target, it sometimes recognizes them for a while, but not everywhere and not for long.
Do you think it could get improved by this? https://github.com/bazelbuild/intellij/pull/6606
- BTW, Every time I click sync on a target, it changes the project SDK back to Java and i have to go and change it back to python, both of these cause the IDE to re-index.
Probably a low hanging fruit
- Auto-generate build targets when adding a python import (Yeah, i know its a lot to ask)
Yeah, that would be a big thing. But still you can reduce waiting time by using partial import
- Better support for executing test targets, especially bazel generated test targets. like, we have our own macro's which inject tests templated tests
For that, we would need a repro, but I can't guarantee it will be fixed in this plugin
Do you think it could get improved by this? https://github.com/bazelbuild/intellij/pull/6606
Actually, I've never faced that issue, we try to keep our package structure to a very strict yet simple use cases, basically each directory is also a bazel package, no gaps. and for the most part, no nesting (i.e. build file and source file share a directory)
@ilanKeshet One more thing. When comes to this item
Auto-generate build targets when adding a python import (Yeah, i know its a lot to ask)
you should probably take a look at gazelle https://github.com/bazelbuild/rules_python/blob/main/gazelle/README.md
this is exactly what you need, and compatible with the plugin
Description of the bug:
In
IntelliJ IDEA 2024.2.0.1 (Ultimate Edition)
whencom.google.idea.bazel.ijwb (2024.07.30.0.1-api-version-242)
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.
Issue reproduces when switching in and out of the ide (like
Cmd + Tab
to go to a different application and come back) , or when executing tests.Which Intellij IDE are you using? Please provide the specific version.
IntelliJ IDEA 2024.2.0.1 (Ultimate Edition)
What programming languages and tools are you using? Please provide specific versions.
Python 3.9.2
What Bazel plugin version are you using?
024.07.30.0.1-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?
Environment