-
Notifications
You must be signed in to change notification settings - Fork 72
Rename Error
to MCPError
#44
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
This is a breaking API change. The impact of this breaking change should be low, as most API, as I suspect that API callers are less likely to catch on specific MCP errors. We could mitigate the impact of this breaking change by introducing a top-level Instead, we can introduce a new top-level |
…ide deprecation notice for existing usage of MCP.Error
One unintended consequence of the We could declare a |
import class Foundation.JSONEncoder | ||
import class Foundation.JSONDecoder | ||
import struct Foundation.Data | ||
import struct Foundation.POSIXError |
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.
The reason why someone might need to fully-qualify MCP.Method
or MCP.Notification
is to fix a different namespace collision with Foundation.
As a workaround, you can import individual declarations as needed. Apologies in advance for any inconvenience this causes 🙇
* Rename Error to MCPError * Conform MCPError to Swift.Error * Use unqualified Error instead of Swift.Error * Use unqualified MCPError instead of MCP.MCPError * Rename file back to Error.swift * Introduce top-level MCP namespace with nested Error typealias to provide deprecation notice for existing usage of MCP.Error * Fix markup for MCP enum warning
Resolves #32