lppedd / idea-conventional-commit

Context and template-based completion for conventional/semantic commits.
https://plugins.jetbrains.com/plugin/13389-conventional-commit
MIT License
327 stars 19 forks source link

java.lang.ClassCastException: class com.github.lppedd.cc.parser.InvalidToken cannot be cast to class #62

Closed rklec closed 2 years ago

rklec commented 2 years ago

STR

I do have gittoolbox installed and emoji completion in commits enabled (as Unicode) and I tried to use : to search and enter an emoji. grafik

It could not find any emoji, altghough it worked for the previous coimmit (already committed and was auto-suggested to me).

java.lang.ClassCastException: class com.github.lppedd.cc.parser.InvalidToken cannot be cast to class com.github.lppedd.cc.parser.ValidToken (com.github.lppedd.cc.parser.InvalidToken and com.github.lppedd.cc.parser.ValidToken are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @33bffa79)
    at com.github.lppedd.cc.parser.FooterTokens.getContext(FooterTokens.kt:18)
    at com.github.lppedd.cc.completion.CommitCompletionContributor.fillCompletionVariants(CommitCompletionContributor.kt:151)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:60)
    at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:133)
    at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:41)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$12(CompletionProgressIndicator.java:863)
    at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:163)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
    at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:574)
    at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:162)
    at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:43)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:859)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:847)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$6(CodeCompletionHandlerBase.java:353)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$tryReadOrCancel$5(CompletionThreading.java:172)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:170)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:345)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$0(CompletionThreading.java:95)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:91)
    at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
    at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:265)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)

system

WebStorm 2021.1.3 Build #WS-211.7628.25, built on June 30, 2021

Runtime version: 11.0.11+9-b1341.60 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 12 Registry: debugger.watches.in.variables=false, ide.balloon.shadow.size=15 Non-Bundled Plugins: com.github.lppedd.idea-conventional-commit (0.18.0), zielu.gittoolbox (203.5.10), mobi.hsz.idea.gitignore (4.1.0), com.crunch42.openapi (1.18), com.intellij.swagger (211.7142.14), izhangzhihao.rainbow.brackets (6.19)

lppedd commented 2 years ago

Thanks for the report. I'll install GitToolBox and verify myself 😄

lppedd commented 2 years ago

What happens when you use emojis with the new syntax highlighting support? Do they work?

rklec commented 2 years ago

Seems to work: grafik

lppedd commented 2 years ago

@rklec nice. Do you still reiceve the exception?

rklec commented 2 years ago

Have not seen it again, so no I'll close it then.