Skip to content

Fix MsgPackRawValue Codable when init(from:) / encode(to:) are called directly - #14

Merged
nnabeyang merged 2 commits into
mainfrom
fix/raw-value-non-fastpath-coders
Jul 17, 2026
Merged

Fix MsgPackRawValue Codable when init(from:) / encode(to:) are called directly#14
nnabeyang merged 2 commits into
mainfrom
fix/raw-value-non-fastpath-coders

Conversation

@nnabeyang

Copy link
Copy Markdown
Owner

MsgPackRawValue.init(from:) / encode(to:) previously threw unconditionally, breaking paths where Swift calls the Codable witnesses directly — superDecoder(forKey:) / superEncoder(forKey:) and the Array / Optional DecodableWithConfiguration conformances — even though the coder IS a MsgPackDecoder / MsgPackEncoder. Route both through the existing fast-paths (_MsgPackDecoder.unwrap(as:) / wrapMsgPackRawValue) when the coder is native, and keep throwing for foreign coders.

@nnabeyang
nnabeyang merged commit 8b1c042 into main Jul 17, 2026
6 checks passed
@nnabeyang
nnabeyang deleted the fix/raw-value-non-fastpath-coders branch July 17, 2026 01:08
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.

1 participant