Skip to content

Investigate if Extensible Enums Members Can Be Restored via Back Compat #11417

Closed

Description

There's at least one scenario in the mgmt libraries where an extensible enum removed members between versions which would be a breaking change.

We should investigate if this is feasable to support via back compat. There may be some limitations in the current implementation, since we don't pull the symbols when loading a library's last contract dll

Activity

  1. github-actions commented on Jul 27, 2026

    @github-actions
    Contributor

    🎯 Issue Triage

    This is an investigation task to determine whether the C# client emitter can support back-compat restoration of extensible enum members that were removed between API versions, using the Azure.ResourceManager.CostManagement library as a concrete example.

    Category: Feature Request

    Area: emitter:client:csharp

    🔍 Analysis
    • The issue identifies a real-world case in Azure.ResourceManager.CostManagement where an extensible enum (OperationStatusType) had members removed in a newer version — which constitutes a breaking change for SDK consumers.
    • The request is to investigate whether the back-compat mechanism in the C# emitter (which already handles underscore naming preservation) could be extended to also restore removed enum members.
    • A known limitation mentioned: the emitter currently does not load DLL symbols from a library's last contract, which may constrain what's detectable for back-compat purposes.
    • Related issues: Add back compat for extensible enum members that used underscores #10537 (back compat for underscore enum members), Check Custom Code When Preserve enum member underscores for backcompat #11314 (check custom code when preserving enum member underscores — closed/completed).
    📝 Suggested next steps
    • Investigate how the current back-compat mechanism loads the previous contract and what data is available (symbols, DLL, etc.)
    • Determine if removed enum members can be detected from the last contract without DLL symbol loading
    • Prototype restoring removed extensible enum members and validate against OperationStatusType in Azure.ResourceManager.CostManagement
    • Assess if restored members conflict with custom code (similar to the check done in Check Custom Code When Preserve enum member underscores for backcompat #11314)

    Generated by Agentic Triage

  2. added a commit that references this issue on Aug 5, 2026
    395a298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

emitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharpfeatureNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions