-
Notifications
You must be signed in to change notification settings - Fork 576
Remove obsolete APIs from codebase #985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: MackinnonBuck <[email protected]>
Co-authored-by: MackinnonBuck <[email protected]>
|
@copilot please address the merge conflicts in your branch. |
Co-authored-by: eiriktsarpalis <[email protected]>
Merge conflicts resolved in commit cd8f7ae. The conflicts were modify/delete conflicts where the test files for obsolete extension methods were modified in main (to add |
|
@copilot your changes failed to fix all merge conflicts. |
…te-apis # Conflicts: # tests/ModelContextProtocol.Tests/Client/McpClientExtensionsTests.cs # tests/ModelContextProtocol.Tests/McpEndpointExtensionsTests.cs # tests/ModelContextProtocol.Tests/Server/McpServerExtensionsTests.cs
All merge conflicts have been resolved in commit 3d20111. The conflicts were from PR #984 which removed |
… McpClient.Methods.cs Co-authored-by: eiriktsarpalis <[email protected]>
Co-authored-by: eiriktsarpalis <[email protected]>
MackinnonBuck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot it looks like there are more obsolete APIs you need to remove:
IMcpEndpointIMcpClientMcpClientFactoryIMcpServer
|
@copilot You missed the following APIs that are marked as
When removing these, there is code in
Additionally, all places where After these changes, there should not be any code search results for "[Obsolete" or "0618". |
jeffhandley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… and all CS0618 pragma warnings Co-authored-by: jeffhandley <[email protected]>
All remaining obsolete APIs removed in commit 93a6877: Deleted Classes:
Removed from ElicitRequestParams.Converter:
Deleted Test Files:
Updated Tests:
Verified:
|
tests/ModelContextProtocol.Tests/Protocol/PrimitiveSchemaDefinitionTests.cs
Show resolved
Hide resolved
tests/ModelContextProtocol.Tests/Protocol/PrimitiveSchemaDefinitionTests.cs
Show resolved
Hide resolved
tests/ModelContextProtocol.Tests/Protocol/PrimitiveSchemaDefinitionTests.cs
Show resolved
Hide resolved
…ut obsolete types Co-authored-by: jeffhandley <[email protected]>
@jeffhandley, those just got merged as part of #969, and I believe they'd still be needed for backwards wire compatibility. |
@stephentoub @jeffhandley Sounds like we should revert 93a6877 and 186d85c, then? |
|
Yeah, but we should organize those classes and tests to distinguish them better, and apply |
…ema types and all CS0618 pragma warnings"
- Polyfill ObsoleteAttribute and ExperimentalAttribute on netstandard - Assign MCP00001 for EnumSchema/LegacyTitledEnumSchema - Improve clarity and maintainability for enum schema tests - Illustrate assigning MCP50001 for experimental Tasks
| // public const string Tasks_DiagnosticId = "MCP50001"; | ||
| // public const string Tasks_Message = "The Tasks feature is experimental within specification version 2025-11-25 and is subject to change. See SEP-1686 for more information."; | ||
| // public const string Tasks_Url = "https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1686"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eiriktsarpalis I illustrated defining Tasks as experimental
Remove Obsolete APIs
This PR removes APIs marked with
[Obsolete]that no longer need to be kept for backward compatibility, per issue #774.Summary
Successfully removed obsolete APIs from the codebase:
This PR also introduces the infrastructure to support custom diagnostics for both obsoletions and experimental APIs.
Two obsolete enum schema classes remain for backward compatibility:
LegacyTitledEnumSchemaandEnumSchema, per (#969) Implement SEP-1330: Standards-compliant enum schemas for elicitationMCP00001diagnostic ID is assigned to these APIs, linking to the SEP issue