Skip to content

ORLEANS0020 should offer a code fix to create OrleansContracts.txt #10871

Description

@ReubenBond

Description

When contract analysis is enabled without an OrleansContracts.txt file, ORLEANS0020 is reported but offers no code fix.

The code-fix provider excludes ORLEANS0020 from FixableDiagnosticIds, even though its implementation already contains logic for creating an additional document.

Reproduction

Enable contract analysis in a project containing a grain interface:

<PropertyGroup>
  <EnableOrleansContractsAnalyzer>true</EnableOrleansContractsAnalyzer>
</PropertyGroup>

Delete or omit OrleansContracts.txt, then build.

Actual behavior

ORLEANS0020 is reported, but the file must be manually created before the remaining contract code fixes become available.

Expected behavior

Offer a code fix which creates OrleansContracts.txt, preferably populating its deterministic generated header and current contract declarations.

Version

Microsoft Orleans 10.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions