Skip to content

Conversation

@devcrocod
Copy link
Contributor

  • increase the deprecation level
  • remove tests that use deprecated objects with deprecation level = error

Motivation and Context

deprecation lifecycle

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copilot AI review requested due to automatic review settings January 30, 2026 14:48
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

Advances the deprecation lifecycle by escalating several deprecated Kotlin SDK APIs to DeprecationLevel.ERROR and removing old-schema tests/usages that would now fail compilation.

Changes:

  • Raised deprecation levels for multiple legacy APIs (constructors/functions/aliases) from WARNING to ERROR.
  • Removed old-schema test suites and integration tests that relied on now-error deprecated APIs.
  • Added targeted suppressions and updated a few imports to use io.modelcontextprotocol.kotlin.sdk.types.*.

Reviewed changes

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

Show a summary per file
File Description
kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/OldSchemaStdioServerTransportTest.kt Removed tests relying on old-schema/std IO APIs.
kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/WebSocketMcpKtorServerExtensions.kt Added suppression annotations around deprecated Ktor Route helpers.
kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/Server.kt Escalated deprecations (connect, onInitialized) to ERROR.
kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt Removed deprecated SSEServerTransport typealias.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/OldSchemaReadBufferTest.kt Removed old-schema ReadBuffer tests.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/models/OldSchemaProgressNotificationsTest.kt Removed old-schema progress notification tests.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/OldSchemaTypesTest.kt Removed old-schema types/serialization tests.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/OldSchemaToolSerializationTest.kt Removed old-schema tool serialization tests.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/OldSchemaRequestSerializerTest.kt Removed old-schema request-result deserialization tests.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/OldSchemaCallToolResultUtilsTest.kt Removed tests for deprecated CallToolResult helpers.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/OldSchemaAudioContentSerializationTest.kt Removed old-schema audio serialization test.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/tools.kt Escalated deprecated ListToolsRequest ctor to ERROR.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/roots.kt Escalated deprecated ListRootsRequest ctor to ERROR.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/resources.kt Escalated deprecated resource request ctors to ERROR.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/prompts.kt Escalated deprecated ListPromptsRequest ctor to ERROR.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/completion.kt Escalated deprecated CompleteRequest ctor to ERROR.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types.util.kt Escalated deprecated helpers/aliases to ERROR and added suppressions.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt Escalated deprecated shared.McpJson to ERROR.
kotlin-sdk-client/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldStreamableHttpClientTest.kt Removed old-schema streamable HTTP client integration test.
kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaStreamableHttpClientTransportTest.kt Removed old-schema transport tests.
kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaMockTransport.kt Removed old-schema mock transport used by deprecated tests.
kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaClientMetaParameterTest.kt Removed old-schema meta-parameter test suite.
kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt Removed deprecated SSEClientTransport typealias.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ServerInstructionsTest.kt Updated imports to io.modelcontextprotocol.kotlin.sdk.types.*.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/OldSchemaServerToolsTest.kt Removed old-schema server tools integration tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/OldSchemaServerResourcesTest.kt Removed old-schema server resources integration tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/OldSchemaServerPromptsTest.kt Removed old-schema server prompts integration tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/OldSchemaServerInstructionsTest.kt Removed old-schema server instructions tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/OldSchemaAbstractServerFeaturesTest.kt Removed old-schema shared test base.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/typescript/stdio/OldSchemaKotlinClientTsServerTestStdio.kt Removed old-schema TS stdio integration test wrapper.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/typescript/stdio/OldSchemaKotlinClientTsServerEdgeCasesTestStdio.kt Removed old-schema TS stdio edge-case tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/typescript/sse/OldSchemaKotlinServerForTsClientSse.kt Removed old-schema Kotlin server used for TS SSE tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/typescript/sse/OldSchemaKotlinClientTsServerTestSse.kt Removed old-schema TS SSE integration test wrapper.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/typescript/sse/OldSchemaKotlinClientTsServerEdgeCasesTestSse.kt Removed old-schema TS SSE edge-case tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/typescript/OldSchemaAbstractKotlinClientTsServerTest.kt Removed old-schema TS integration shared base.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/sse/OldSchemaSseIntegrationTest.kt Removed old-schema SSE integration tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/sse/OldSchemaAbstractSseIntegrationTest.kt Removed old-schema SSE integration test base.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/websocket/OldSchemaWebSocketIntegrationTest.kt Removed old-schema WebSocket integration tests.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/stdio/OldSchemaToolIntegrationTestStdio.kt Removed old-schema stdio tool integration test entrypoint.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/stdio/OldSchemaResourceIntegrationTestStdio.kt Removed old-schema stdio resource integration test entrypoint.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/stdio/OldSchemaPromptIntegrationTestStdio.kt Removed old-schema stdio prompt integration test entrypoint.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/sse/OldSchemaToolIntegrationTestSse.kt Removed old-schema SSE tool integration test entrypoint.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/sse/OldSchemaResourceIntegrationTestSse Removed old-schema SSE resource integration test entrypoint.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/sse/OldSchemaPromptIntegrationTestSse.kt Removed old-schema SSE prompt integration test entrypoint.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/OldSchemaKotlinTestBase.kt Removed old-schema Kotlin integration test base.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/OldSchemaAbstractToolIntegrationTest.kt Removed old-schema tool integration test suite.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/OldSchemaAbstractResourceIntegrationTest.kt Removed old-schema resource integration test suite.
integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/OldSchemaAbstractPromptIntegrationTest.kt Removed old-schema prompt integration test suite.
integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/OldSchemaInMemoryTransport.kt Removed old-schema in-memory transport implementation used by deprecated tests.
integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/OldSchemaBaseTransportTest.kt Removed old-schema base transport test utilities.
integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/OldSchemaInMemoryTransportTest.kt Removed old-schema in-memory transport tests.
integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaSseTransportTest.kt Removed old-schema SSE transport tests.
integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaClientTest.kt Removed old-schema client test suite.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants