Skip to content

Update to latest stable version of Microsoft.CodeAnalysis.PublicApiAnalyzers (3.3.3) to fix Roslyn crashing issue #41099

Closed
@DamianEdwards

Description

@DamianEdwards

The repo currently uses version 3.3.0 of the Microsoft.CodeAnalysis.PublicApiAnalyzers package, which is causing a stack overflow exception in the compiler if an generic interface is added with a generic static abstract method, e.g.:

using System.Reflection;

namespace Microsoft.AspNetCore.Http;

public interface IBindableFromHttpContext<TSelf> where TSelf : IBindableFromHttpContext<TSelf>
{
    static abstract ValueTask<TSelf?> BindAsync(HttpContext context, ParameterInfo parameter);
}

Updating to version 3.3.3 of the analyzer fixes the crash but introduces a lot of new errors from the analyzer for the existing PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt files in the repo, assumingly due to rule improvements since 3.3.0.

Adding of the above interface (#40927) is currently blocked based on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions