zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
604 stars 71 forks source link

[BUG] Inline blame did not show in status bar. #487

Closed YunshuaiPeng closed 1 year ago

YunshuaiPeng commented 1 year ago

Describe the bug Inline blame did not show in status bar.

To Reproduce Steps to reproduce the behavior:

  1. check the option and restart ide.

    image
  2. take look at status bar

    image

Expected behavior blame in status bar

Plugin version 500.0.10+213

IDE version IntelliJ IDEA 2023.1.3 (Ultimate Edition) Build #IU-231.9161.38, built on June 20, 2023 Runtime version: 17.0.7+10-b829.16 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.4 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Metal Rendering is ON Registry: ide.disable.editor.tooltips=true toolwindow.disable.overlay.by.double.key=true debugger.new.tool.window.layout=true documentation.show.toolbar=true ide.experimental.ui=true eslint.additional.file.extensions=svelte

Non-Bundled Plugins: org.rust.lang (0.4.196.5423-231) com.jetbrains.php (231.9161.38) de.beyondco.tinkerwell.tinkerwell (2.5.1) com.jetbrains.php.blade (231.9161.38) zielu.gittoolbox (500.0.10+213) Pythonid (231.9161.38) ru.adelf.idea.dotenv (2023.1) com.laravel_idea.plugin (7.1.4.231)

Kotlin: 231-1.8.21-IJ9161.38

zielu commented 1 year ago

Hi, looking at background color (yellowish) and name color (gray) of opened file it looks to be a library file. For such there is no git blame available.

Could you describe why would you expect to see blame for it ?

YunshuaiPeng commented 1 year ago

Hi, looking at background color (yellowish) and name color (gray) of opened file it looks to be a library file. For such there is no git blame available.

Could you describe why would you expect to see blame for it ?

Hi, I open another file that added to git. And I press option+shift+b, then I got the following screenshort.

image
zielu commented 1 year ago

Hi, I released a new EAP build which contains additional logging.

  1. How to switch to it: https://github.com/zielu/GitToolBox#eap-builds
  2. How to enable debug logs is described here: https://github.com/zielu/GitToolBox/wiki/Manual#logging

After logs are enabled please open a file which is under git (for example one you have selected in last screenshot) and move around it with cursor switching lines of text.

When you are done, please share the log file.

YunshuaiPeng commented 1 year ago
2023-06-25 09:53:18,321 [  34202]   INFO - #c.i.u.MemTester - not supported: not an executable file: null
2023-06-25 09:53:19,800 [  35681]   WARN - #c.j.p.PhpIndex - Invalid Signature '\array<#ᢐ\TKey.,\mixed>'
2023-06-25 09:53:20,121 [  36002]   FINE - #zielu.gittoolbox.ui.uiBlame - Widget - update on caret position change
2023-06-25 09:53:20,649 [  36530]   FINE - #zielu.gittoolbox.ui.uiBlame - Widget - update on caret position change
2023-06-25 09:53:21,435 [  37316]   FINE - #zielu.gittoolbox.ui.uiBlame - Widget - update on caret position change
2023-06-25 09:53:21,865 [  37746]   FINE - #zielu.gittoolbox.ui.uiBlame - Widget - update on caret position change
2023-06-25 09:53:23,313 [  39194]   FINE - #zielu.gittoolbox.blame - Scheduled task for file:///code/app/Models/Boming.php: s[delegate=AnnotationLoader]
2023-06-25 09:53:23,314 [  39195]   FINE - #zielu.gittoolbox.blame.blameCache - Added annotation task for file:///code/app/Models/Boming.php
2023-06-25 09:53:23,314 [  39195]   FINE - #zielu.gittoolbox.blame - Get line index 359 blame for file:///code/app/Models/Boming.php info RevisionInfo=[NULL]
2023-06-25 09:53:23,317 [  39198]   FINE - #zielu.gittoolbox.blame.blameCache - Annotate file:///code/app/Models/Boming.php
2023-06-25 09:53:23,389 [  39270]   INFO - #zielu.gittoolbox.blame.blameCache - Blame details persistence to /Users/ys/Library/Caches/JetBrains/IntelliJIdea2023.1/projects/digicor.e59127bc/gittoolbox/blame-details/details.db
2023-06-25 09:53:23,391 [  39272]   INFO - #zielu.gittoolbox.blame.blameCache - Blame access persistence to /Users/ys/Library/Caches/JetBrains/IntelliJIdea2023.1/projects/digicor.e59127bc/gittoolbox/blame-access/access.db
2023-06-25 09:53:23,444 [  39325]   FINE - #zielu.gittoolbox.blame.blameCalculator - Found persisted blame provider for file:///code/app/Models/Boming.php at af3b88c0b04457c63450a36a7f561e4baa14b834
2023-06-25 09:53:23,446 [  39327]   FINE - #zielu.gittoolbox.blame.blameCache - Annotated file:///code/app/Models/Boming.php:ZResult(result=BlameAnnotation=[provider=RestoredBlameProvider=[baseRevision=af3b88c0b04457c63450a36a7f561e4baa14b834, file=file:///code/app/Models/Boming.php, lineCount=3956]], error=null)
2023-06-25 09:53:23,446 [  39327]   FINE - #zielu.gittoolbox.blame.blameCache - Annotation loaded for file:///code/app/Models/Boming.php: BlameAnnotation=[provider=RestoredBlameProvider=[baseRevision=af3b88c0b04457c63450a36a7f561e4baa14b834, file=file:///code/app/Models/Boming.php, lineCount=3956]]
2023-06-25 09:53:23,448 [  39329]   FINE - #zielu.gittoolbox.blame - Cache updated notification for file:///code/app/Models/Boming.php: BlameAnnotation=[provider=RestoredBlameProvider=[baseRevision=af3b88c0b04457c63450a36a7f561e4baa14b834, file=file:///code/app/Models/Boming.php, lineCount=3956]]
2023-06-25 09:53:23,449 [  39330]   FINE - #zielu.gittoolbox.blame - Invalidate line provider for file:///code/app/Models/Boming.php
2023-06-25 09:53:23,449 [  39330]   FINE - #zielu.gittoolbox.blame - Blame updated for file:///code/app/Models/Boming.php annotation BlameAnnotation=[provider=RestoredBlameProvider=[baseRevision=af3b88c0b04457c63450a36a7f561e4baa14b834, file=file:///code/app/Models/Boming.php, lineCount=3956]]
2023-06-25 09:53:23,450 [  39331]   FINE - #zielu.gittoolbox.blame - Service - fire blame updated file:///code/app/Models/Boming.php
2023-06-25 09:53:23,451 [  39332]   FINE - #zielu.gittoolbox.ui.uiBlame - Blame updated Project(name=digicor, containerState=COMPONENT_CREATED, componentStore=/code): file:///code/app/Models/Boming.php
2023-06-25 09:53:23,451 [  39332]   FINE - #zielu.gittoolbox.ui.uiBlame - On blame update Project(name=digicor, containerState=COMPONENT_CREATED, componentStore=/code): [file:///code/app/Models/Boming.php]
2023-06-25 09:53:23,452 [  39333]   FINE - #zielu.gittoolbox.ui.uiBlame - Widget - blame updated: file:///code/app/Models/Boming.php
2023-06-25 09:53:24,556 [  40437]   FINE - #zielu.gittoolbox.blame - Get line index 359 blame for file:///code/app/Models/Boming.php info RevisionInfoImpl(revisionNumber=45383327002e41847bb43ada74cf19ccf6c307fb, author=Yunshuai, date=2023-06-13T09:50:32+08:00, subject=chore: optimize calculation process, authorEmail=hi@yunshuai.me)
2023-06-25 09:53:27,758 [  43639]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities to files
2023-06-25 09:53:27,962 [  43843]   INFO - #c.i.c.ComponentStoreImpl - Saving appCodeVisionSettings took 15 ms, EmmetOptions took 19 ms, ExportableFileTemplateSettings took 19 ms
2023-06-25 09:53:29,950 [  45831]   WARN - #c.i.i.a.s.WaitForContributorsListenerWrapper - Contributor 'ActionSearchEverywhereContributor' did not finish search for 'Show Log in' in 3000ms. Maybe it should implement PossibleSlowContributor interface?
2023-06-25 09:53:32,126 [  48007]   WARN - #c.i.i.a.s.WaitForContributorsListenerWrapper - Contributor 'ActionSearchEverywhereContributor' did not finish search for 'Show Log in' in 3000ms. Maybe it should implement PossibleSlowContributor interface?
2023-06-25 09:53:32,258 [  48139]   WARN - #c.i.i.a.s.WaitForContributorsListenerWrapper - Contributor 'ActionSearchEverywhereContributor' did not finish search for 'Show Log in' in 3000ms. Maybe it should implement PossibleSlowContributor interface?
2023-06-25 09:53:32,755 [  48636] SEVERE - #c.i.o.a.i.ApplicationImpl - Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())
Current thread: Thread[SE-SearchTask-ActionSearchEverywhereContributor,4,main] 1753369159 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 963384285
java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())
Current thread: Thread[SE-SearchTask-ActionSearchEverywhereContributor,4,main] 1753369159 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 963384285
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
    at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1004)
    at com.intellij.openapi.fileEditor.impl.FileDocumentManagerBase.getDocument(FileDocumentManagerBase.java:45)
    at com.intellij.psi.impl.PsiDocumentManagerBase.getDocument(PsiDocumentManagerBase.java:169)
    at com.intellij.ui.LanguageTextField.lambda$createDocument$0(LanguageTextField.java:103)
    at com.intellij.openapi.project.ProjectLocator.computeWithPreferredProject(ProjectLocator.java:58)
    at com.intellij.ui.LanguageTextField.createDocument(LanguageTextField.java:101)
    at com.intellij.ui.LanguageTextField$SimpleDocumentCreator.createDocument(LanguageTextField.java:81)
    at com.intellij.ui.LanguageTextField.<init>(LanguageTextField.java:65)
    at com.intellij.util.textCompletion.TextFieldWithCompletion.<init>(TextFieldWithCompletion.java:59)
    at com.intellij.util.textCompletion.TextFieldWithCompletion.<init>(TextFieldWithCompletion.java:48)
    at com.intellij.util.textCompletion.TextFieldWithCompletion.<init>(TextFieldWithCompletion.java:38)
    at org.rust.cargo.util.RsCommandLineEditor.createTextField(RsCommandLineEditor.kt:41)
    at org.rust.cargo.util.RsCommandLineEditor.<init>(RsCommandLineEditor.kt:27)
    at org.rust.cargo.project.configurable.RsExternalLinterConfigurable.<init>(RsExternalLinterConfigurable.kt:27)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:1007)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:1051)
    at com.intellij.openapi.options.ConfigurableEP$ClassProducer.createElement(ConfigurableEP.java:438)
    at com.intellij.openapi.options.ConfigurableEP.createConfigurable(ConfigurableEP.java:344)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.createConfigurable(ConfigurableWrapper.java:43)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.getConfigurable(ConfigurableWrapper.java:124)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.cast(ConfigurableWrapper.java:99)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.getDisplayName(ConfigurableWrapper.java:145)
    at com.intellij.ide.util.gotoByName.GotoActionModel.lambda$new$0(GotoActionModel.java:79)
    at com.intellij.openapi.util.NotNullLazyValue$4.compute(NotNullLazyValue.java:120)
    at com.intellij.openapi.util.NotNullLazyValue$4.getValue(NotNullLazyValue.java:105)
    at com.intellij.ide.util.gotoByName.GotoActionModel.getConfigurablesNames(GotoActionModel.java:365)
    at com.intellij.ide.util.gotoByName.GotoActionItemProvider.processOptions(GotoActionItemProvider.java:148)
    at com.intellij.ide.util.gotoByName.GotoActionItemProvider.filterElements(GotoActionItemProvider.java:94)
    at com.intellij.ide.actions.searcheverywhere.ActionSearchEverywhereContributor.lambda$fetchWeightedElements$1(ActionSearchEverywhereContributor.java:99)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.ide.actions.searcheverywhere.ActionSearchEverywhereContributor.fetchWeightedElements(ActionSearchEverywhereContributor.java:98)
    at com.intellij.ide.actions.searcheverywhere.MixedResultsSearcher$ContributorSearchTask.run(MixedResultsSearcher.java:183)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:227)
    at com.intellij.util.ConcurrencyUtil.lambda$underThreadNameRunnable$3(ConcurrencyUtil.java:215)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:252)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    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:833)
2023-06-25 09:53:32,757 [  48638] SEVERE - #c.i.o.a.i.ApplicationImpl - IntelliJ IDEA 2023.1.3  Build #IU-231.9161.38
2023-06-25 09:53:32,757 [  48638] SEVERE - #c.i.o.a.i.ApplicationImpl - JDK: 17.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2023-06-25 09:53:32,757 [  48638] SEVERE - #c.i.o.a.i.ApplicationImpl - OS: Mac OS X
2023-06-25 09:53:32,757 [  48638] SEVERE - #c.i.o.a.i.ApplicationImpl - Plugin to blame: Rust version: 0.4.196.5423-231
2023-06-25 09:53:33,415 [  49296]   WARN - #c.i.i.u.s.SearchableOptionsRegistrarImpl - === Search storage init canceled ===
2023-06-25 09:53:33,677 [  49558]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities to files
2023-06-25 09:53:33,822 [  49703]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=digicor, containerState=COMPONENT_CREATED, componentStore=/code)LaravelIdeaMainSettings took 30 ms, RunManager took 13 ms
zielu commented 1 year ago

Hi, it looks like we are closing in on the issue, I pushed one more build (500.0.12+213), please repeat actions one more time and share the logs.

YunshuaiPeng commented 1 year ago

Hi, it looks like we are closing in on the issue, I pushed one more build (500.0.12+213), please repeat actions one more time and share the logs.

After update to 500.0.12+213. It works. Thanks.

zielu commented 1 year ago

Great, it was threading related.