-
Notifications
You must be signed in to change notification settings - Fork 454
refactor: remove deprecated 0.7.0 code #66
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
Conversation
These changes are part of the planned deprecation cycle announced in 0.8.0, with the deprecated classes scheduled for removal in 0.9.0 - Delete WebFluxSseServerTransport, WebMvcSseServerTransport, StdioServerTransport, and HttpServletSseServerTransport - Remove deprecated interfaces: ServerMcpTransport, ClientMcpTransport - Delete DefaultMcpSession implementation - Remove all deprecated test classes for the removed implementations - Update references to use McpServerTransport and McpClientTransport interfaces Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@@ -71,7 +71,7 @@ public class McpSyncClient implements AutoCloseable { | |||
*/ | |||
@Deprecated |
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.
Looks like this deprecation annotation is incorrect
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.
It is correct. The intention was to allow us to hide the visibility in 0.9.0. We can also remove the deprecated javadoc note above now.
* interfaces. | ||
*/ | ||
public class MockMcpTransport implements McpClientTransport, ServerMcpTransport { | ||
public class MockMcpTransport implements McpClientTransport, McpServerTransport { |
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.
Looks like we need to split the MockMcpTransport to client and server mocks.
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.
Resolved in the last commit
mcp/src/test/java/io/modelcontextprotocol/server/McpServerProtocolVersionTests.java
Outdated
Show resolved
Hide resolved
- Rename MockMcpTransport to MockMcpClientTransport in mcp/src/test - Create new MockMcpServerTransport implementation - Add MockMcpServerTransportProvider for server tests - Mark MockMcpTransport in mcp-test module as deprecated - Update all test classes to use the new implementations Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
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.
Thanks! Overall all good, just two comments to address 👍
@@ -71,7 +71,7 @@ public class McpSyncClient implements AutoCloseable { | |||
*/ | |||
@Deprecated |
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.
It is correct. The intention was to allow us to hide the visibility in 0.9.0. We can also remove the deprecated javadoc note above now.
return Mono.defer(() -> { | ||
return Mono.empty(); | ||
}); | ||
} |
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.
No need for defer
. return Mono.empty()
is enough.
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
rebased, squashed and merged at 25f3bad |
These changes are part of the planned deprecation cycle announced in 0.8.0, with the deprecated classes scheduled for removal in 0.9.0