You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing version 2.2.1 (or 2.2.0) of Microsoft.Azure.WebJobs.Extensions.DurableTask and by extension 0.2.1 of the Microsoft.Azure.WebJobs.Extensions.DurableTask.Analyzers caused our build to crash as we got warnings that the analyzer had ran into an exception (and we treat warnings as errors).
I made a small repro, and it seems to be due to us using C# 8 local functions in orchestrators.
Expected behavior
Analyzer gives warnings and errors that it is able to give.
Actual behavior
Warning when building the project:
Warning
AD0001
'Microsoft.Azure.WebJobs.Extensions.DurableTask.Analyzers.OrchestratorAnalyzer' threw an exception of type 'System.InvalidCastException' with message 'Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.LocalFunctionStatementSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax'.'.
Version 0.2.1 and 0.2.2 of the analyzers throw the same exception.
Relevant source code snippets
Modifying the "Hello world" orchestrator like this is enough to trigger the warning:
Hey @juunas11, I just wanted to let you know that this fix is in the 0.2.3 analyzer release, which is available now if you reference this directly. It will also be added by default with the durable extension starting with the (upcoming) Durable 2.2.2 release.
Description
Installing version 2.2.1 (or 2.2.0) of Microsoft.Azure.WebJobs.Extensions.DurableTask and by extension 0.2.1 of the Microsoft.Azure.WebJobs.Extensions.DurableTask.Analyzers caused our build to crash as we got warnings that the analyzer had ran into an exception (and we treat warnings as errors).
I made a small repro, and it seems to be due to us using C# 8 local functions in orchestrators.
Expected behavior
Analyzer gives warnings and errors that it is able to give.
Actual behavior
Warning when building the project:
Version 0.2.1 and 0.2.2 of the analyzers throw the same exception.
Relevant source code snippets
Modifying the "Hello world" orchestrator like this is enough to trigger the warning:
Known workarounds
Downgraded the DurableTask extension to 2.1.1 and removed the analyzer.
App Details
The text was updated successfully, but these errors were encountered: