dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.06k stars 4.69k forks source link

Analyzer 'Microsoft.NetCore.CSharp.Analyzers.Performance.CSharpConstantExpectedAnalyzer' threw an exception of type 'System.InvalidCastException` #106088

Open steveharter opened 1 month ago

steveharter commented 1 month ago

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=768643 Build error leg or test failing: Build / linux-arm64 Debug Mono_MiniJIT_LibrariesTests / Build product Pull request: https://github.com/dotnet/runtime/pull/105776

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "'Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Symbols.PublicModel.NonErrorNamedTypeSymbol' to type 'Microsoft.CodeAnalysis.IMethodSymbol'.'.",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=768643 Error message validated: ['Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Symbols.PublicModel.NonErrorNamedTypeSymbol' to type 'Microsoft.CodeAnalysis.IMethodSymbol'.'.] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 8/7/2024 5:32:23 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries See info in area-owners.md if you want to be subscribed.

carlossanlop commented 1 month ago

This issue will track the failures in PRs to mark them as known build errors, but I think we also need to notify the creator (or most recent modifier) of this analyzer either in roslyn or in roslyn-analyzers (wherever the analyzer lives).

carlossanlop commented 1 month ago

This analyzer is from dotnet/roslyn: https://github.com/dotnet/roslyn/blob/969c5177a3fe0a13171c561b45b2d808b9659e56/src/Compilers/CSharp/Portable/Symbols/PublicModel/NonErrorNamedTypeSymbol.cs#L11

@jaredpar do you know who can triage this failure so we can decide on the milestone for the issue?

jaredpar commented 1 month ago

Is this a one off failure or a persistent one? If it's a one off then it's possible it's another dupe of #105572. That can also manifest as cast exceptions.

carlossanlop commented 1 month ago

So far there's only been one hit, according to the KnownBuildError table in this issue description.

jeffschwMSFT commented 3 weeks ago

removing 'blocking-clean-ci' as it has not failed in 30 days

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
jaredpar commented 3 weeks ago

@jeffschwMSFT given the primary bug was fixed and it's 30 days clean should we close the issue?