Skip to content

Revert temporary ITypeSymbol extension APIs#2822

Merged
jjonescz merged 4 commits intomainfrom
copilot/revert-commit-5edf9a1
Jan 20, 2026
Merged

Revert temporary ITypeSymbol extension APIs#2822
jjonescz merged 4 commits intomainfrom
copilot/revert-commit-5edf9a1

Conversation

Copy link
Contributor

Copilot AI commented Oct 10, 2025

Summary

This PR reverts the temporary extension APIs that were added to ITypeSymbol interface to resolve a source build compatibility issue. These APIs are now being removed as they are no longer needed.

Fixes dotnet/roslyn#80281

Background

The IsExtension and ExtensionParameter properties were temporarily added to the ITypeSymbol interface (with [Obsolete] attributes) as a workaround for a source build issue where ILLink analyzer compiled against RC1 Roslyn couldn't work with the latest Roslyn that had removed these APIs from ITypeSymbol and kept them only on INamedTypeSymbol.

Changes

This PR removes:

  1. ITypeSymbol.IsExtension property - The obsolete property is removed from the base ITypeSymbol interface
  2. ITypeSymbol.ExtensionParameter property - The obsolete property is removed from the base ITypeSymbol interface
  3. new keyword from INamedTypeSymbol - The IsExtension and ExtensionParameter properties on INamedTypeSymbol no longer need the new keyword since they're not hiding base interface members
  4. Implementation code - Removed implementations in:
    • C# TypeSymbol.cs
    • Visual Basic TypeSymbol.vb
    • CodeGenerationTypeSymbol.cs
  5. API tracking entries - Removed entries from PublicAPI.Unshipped.txt and Microsoft.CodeAnalysis.txt

Impact

This change removes temporary/obsolete APIs. The functionality remains available through INamedTypeSymbol.IsExtension and INamedTypeSymbol.ExtensionParameter for code that needs to check if a type is an extension type.

Total changes: 7 files modified, 46 deletions, 2 insertions

Original prompt

Can you revert commit 5edf9a1 which should resolve issue dotnet/roslyn/issues/80281 ?


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Revert commit 5edf9a1 to resolve issue 80281 Revert temporary ITypeSymbol extension APIs Oct 10, 2025
Copilot AI requested a review from jjonescz October 10, 2025 09:43
@akoeplinger
Copy link
Member

@jjonescz is this still needed?

@jjonescz
Copy link
Member

Yes, this removes a temporary workaround and it should be merged once green. I will try to update it

@dotnet-policy-service dotnet-policy-service bot requested a review from a team January 19, 2026 10:37
@jjonescz jjonescz marked this pull request as ready for review January 19, 2026 13:27
Copilot AI review requested due to automatic review settings January 19, 2026 13:27
@jjonescz
Copy link
Member

@333fred @dotnet/roslyn-infrastructure for reviews, thanks

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes temporary/obsolete extension APIs from the ITypeSymbol interface that were added as a workaround for a source build compatibility issue. The IsExtension and ExtensionParameter properties remain available through INamedTypeSymbol where they belong.

Changes:

  • Removed obsolete IsExtension and ExtensionParameter properties from ITypeSymbol interface
  • Removed new keyword from corresponding properties in INamedTypeSymbol since they no longer hide base interface members
  • Cleaned up implementations in C#, Visual Basic, and code generation symbol classes
  • Updated API tracking files to reflect the removal

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/roslyn/src/Compilers/Core/Portable/Symbols/ITypeSymbol.cs Removed obsolete IsExtension and ExtensionParameter property declarations from the interface
src/roslyn/src/Compilers/Core/Portable/Symbols/INamedTypeSymbol.cs Removed new keyword from IsExtension and ExtensionParameter properties
src/roslyn/src/Compilers/CSharp/Portable/Symbols/PublicModel/TypeSymbol.cs Removed C# implementation of the temporary extension properties
src/roslyn/src/Compilers/VisualBasic/Portable/Symbols/TypeSymbol.vb Removed Visual Basic implementation of the temporary extension properties
src/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/Symbols/CodeGenerationTypeSymbol.cs Removed implementation from code generation symbol class
src/roslyn/src/Compilers/Core/Portable/PublicAPI.Shipped.txt Removed API entries for the temporary properties
src/roslyn/src/Tools/SemanticSearch/ReferenceAssemblies/Apis/Microsoft.CodeAnalysis.txt Removed API reference entries for the temporary properties

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jjonescz jjonescz merged commit beef13c into main Jan 20, 2026
17 of 18 checks passed
@jjonescz jjonescz deleted the copilot/revert-commit-5edf9a1 branch January 20, 2026 09:06
@dotnet-policy-service dotnet-policy-service bot requested a review from a team January 20, 2026 09:06
sbomer added a commit that referenced this pull request Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Remove ITypeSymbol extension APIs

6 participants