-
Notifications
You must be signed in to change notification settings - Fork 499
Closed
Description
The PR #1002 introduced an API breaking change. Specifically, the diff changed two messages signatures in Message+JSONAdditions, from
public init(
jsonString: String,
options: JSONDecodingOptions = JSONDecodingOptions()
) throws
public init(
jsonUTF8Data: Data,
options: JSONDecodingOptions = JSONDecodingOptions()
)
to
public init(
jsonString: String,
extensions: ExtensionMap? = nil,
options: JSONDecodingOptions = JSONDecodingOptions()
) throws
public init(
jsonUTF8Data: Data,
extensions: ExtensionMap? = nil,
options: JSONDecodingOptions = JSONDecodingOptions()
)
Adding new parameters to Swift methods, even when they are defaulted, is a SemVer major. This is because functions may be referred to by their complete label set: Message.init(jsonString:options:). With this change, the previously-valid fully-qualified method name no longer exists, and so compiles fail.
We need to update the code to restore the old methods, and to instead add new methods that take the extensions field. It's fine for the method body of the old methods to simply jump to the new ones, but they must continue to exist.
Metadata
Metadata
Assignees
Labels
No labels