olsh / resharper-structured-logging

An extension for ReSharper and Rider that highlights structured logging templates and contains some useful analyzers
MIT License
141 stars 14 forks source link

Log Properties Naming Style not working #91

Closed greuelpirat closed 1 year ago

greuelpirat commented 1 year ago

Using 2023.2 EAP 6 the warning for naming style does not work anymore:

image

JetBrains Rider 2023.2 EAP 6 Build #RD-232.8296.16, built on June 26, 2023 Licensed to JetBrains Rider EAP user: Oliver Ehrenmüller Expiration date: July 26, 2023 Runtime version: 17.0.7+7-b1000.2 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 .NET Core v7.0.7 x64 (Server GC) GC: G1 Young Generation, G1 Old Generation Memory: 16384M Cores: 24 Registry: ide.find.use.editor.font=true ide.experimental.ui=true ide.images.show.chessboard=true ide.new.project.model.index.case.sensitivity=true vcs.empty.toolwindow.show=false

Non-Bundled Plugins: com.intellij.ideolog (222.1.0.0) com.intellij.plugins.riderkeymap (201.6251.22) Abc.MoqComplete.Rider (2023.2.0.1) com.intellij.resharper.StructuredLogging (2023.2.0.297-eap02) tanvd.grazi (232.8296.18) mobi.hsz.idea.gitignore (4.5.1) com.intellij.plugin.adernov.powershell (2.0.10)

greuelpirat commented 1 year ago

just found a potential matching exception in Rider:

com.jetbrains.rdclient.util.BackendException: Analyzer 'ReSharper.Structured.Logging.Analyzer.PropertiesNamingAnalyzer' threw the following exception: Method not found: 'JetBrains.Application.Settings.IContextBoundSettingsStore JetBrains.ProjectModel.SolutionEx.GetSettingsStore(JetBrains.ProjectModel.ISolution)'.

--- EXCEPTION #1/2 [MissingMethodException]
Message = “Method not found: 'JetBrains.Application.Settings.IContextBoundSettingsStore JetBrains.ProjectModel.SolutionEx.GetSettingsStore(JetBrains.ProjectModel.ISolution)'.”
ExceptionPath = Root.InnerException
ClassName = System.MissingMethodException
HResult = COR_E_MISSINGMETHOD=80131513
Source = ReSharper.Structured.Logging.Rider
StackTraceString = “
  at ReSharper.Structured.Logging.Analyzer.PropertiesNamingAnalyzer.Run(IInvocationExpression element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer)
     at JetBrains.ReSharper.Feature.Services.Daemon.ElementProblemAnalyzerRegistrar.ElementAnalyzerDispatcher.Run(ITreeNode element, IHighlightingConsumer consumer) in Run.il:line IL_0063 mvid B328
”

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Analyzer 'ReSharper.Structured.Logging.Analyzer.PropertiesNamingAnalyzer' threw the following exception: Method not found: 'JetBrains.Application.Settings.IContextBoundSettingsStore JetBrains.ProjectModel.SolutionEx.GetSettingsStore(JetBrains.ProjectModel.ISolution)'.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Util.Logging.Logger.LogException(String comment, Exception ex) in LogException.il:line IL_0000 mvid F606
     at JetBrains.ReSharper.Feature.Services.Daemon.ElementProblemAnalyzerRegistrar.ElementAnalyzerDispatcher.Run(ITreeNode element, IHighlightingConsumer consumer) in Run.il:line IL_0019 mvid B328
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpErrorStageProcess.ProcessAfterInterior(ITreeNode element, IHighlightingConsumer consumer) in ProcessAfterInterior.il:line IL_0000 mvid E488
     at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendants(ITreeNode root, IRecursiveElementProcessor processor) in ProcessDescendants.il:line IL_0069 mvid 0BE9
     at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessThisAndDescendants(ITreeNode root, IRecursiveElementProcessor processor) in ProcessThisAndDescendants.il:line IL_003E mvid 0BE9
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.<>c__DisplayClass4_0.<Execute>g__GlobalHighlighter|1() in CSharpIncrementalDaemonStageProcessBase.il:line IL_0022 mvid E488 or CSharpIncrementalDaemonStageProcessBase.il:line IL_0048 mvid E488
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.<>c__DisplayClass4_1.<Execute>b__2() in CSharpIncrementalDaemonStageProcessBase.il:line IL_0022 mvid E488 or CSharpIncrementalDaemonStageProcessBase.il:line IL_0048 mvid E488
     at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action) in AccessViolationCatcher.il:line IL_0000 mvid F606
     at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass38_0`1.<Create>b__0(Object state) in TaskHost.il:line IL_00AB mvid F606
     at System.Threading.Tasks.Task`1.InnerInvoke() in InnerInvoke.il:line IL_002B mvid 42CE
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 42CE
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in ExecuteWithThreadLocal.il:line IL_0096 mvid 42CE
     at System.Threading.Tasks.Task.ExecuteEntry() in ExecuteEntry.il:line IL_0036 mvid 42CE
     at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task) in ExecuteTask.il:line IL_0014 mvid F606
     at JetBrains.Application.Threading.Tasks.TaskBarrier.WaitAll() in WaitAll.il:line IL_0086 mvid F606
     at JetBrains.Util.SafeDisposable.DisposeInternal() in DisposeInternal.il:line IL_0013 mvid F606
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.Execute(Action`1 committer) in Execute.il:line IL_01BD mvid E488
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpErrorStageProcess.Execute(Action`1 committer) in Execute.il:line IL_0006 mvid E488
     at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.RunStage(IDaemonStage stage, DaemonProcessKind processKind, Action`2 commiter, IContextBoundSettingsStore settingsStore, HashSet`1 disabledStages, PsiIsolationScope psiIsolationScope) in RunStage.il:line IL_0168 mvid B328
     at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass47_1.<DoHighlighting>g__StageProc|1(IDaemonStage stage) in DaemonProcessBase.il:line IL_0013 mvid B328
     at JetBrains.Application.Threading.Tasks.TaskBarrierExtensions.<>c__DisplayClass0_1.<EnqueueDependentJobs>b__2() in TaskBarrierExtensions.il:line IL_0000 mvid F606
     at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action) in AccessViolationCatcher.il:line IL_0000 mvid F606
     at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass38_0`1.<Create>b__0(Object state) in TaskHost.il:line IL_00AB mvid F606
     at System.Threading.Tasks.Task`1.InnerInvoke() in InnerInvoke.il:line IL_002B mvid 42CE
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 42CE
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in ExecuteWithThreadLocal.il:line IL_0096 mvid 42CE
     at System.Threading.Tasks.Task.ExecuteEntry() in ExecuteEntry.il:line IL_0036 mvid 42CE
     at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task) in ExecuteTask.il:line IL_0014 mvid F606
     at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask() in EnqueueNextTask.il:line IL_0009 mvid F606
     at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc() in ThreadPoolProc.il:line IL_0197 mvid F606
     at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.StartProc() in StartProc.il:line IL_0000 mvid F606
”

    at com.jetbrains.rdclient.protocol.components.RdClientProtocolComponent$2.invoke(RdClientProtocolComponent.kt:47)
    at com.jetbrains.rdclient.protocol.components.RdClientProtocolComponent$2.invoke(RdClientProtocolComponent.kt:44)
    at com.jetbrains.rd.util.reactive.Signal.fire(Signal.kt:32)
    at com.jetbrains.rd.framework.impl.RdSignal$onWireReceived$2.invoke(RdSignal.kt:32)
    at com.jetbrains.rd.framework.impl.RdSignal$onWireReceived$2.invoke(RdSignal.kt:31)
    at com.jetbrains.rd.framework.MessageBroker$RdWireableDispatchHelper$doDispatch$2.invoke(MessageBroker.kt:122)
    at com.jetbrains.rd.framework.MessageBroker$RdWireableDispatchHelper$doDispatch$2.invoke(MessageBroker.kt:115)
    at com.jetbrains.rdclient.protocol.RdDispatcher.flushAll(RdDispatcher.kt:103)
    at com.jetbrains.rdclient.protocol.RdDispatcher.flushAllRunnable$lambda$0(RdDispatcher.kt:29)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
    at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121)
    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:789)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:740)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:734)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:759)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:685)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:589)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
    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)
greuelpirat commented 1 year ago

Today EAP 7 was released and it seems this is solved.