Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
masterror/masterror-derive/src/error_trait.rs
Lines 52 to 58 in d15ee64
[P1] Preserve wrapped error in transparent source()
When deriving #[error(transparent)], the generated source() calls std::error::Error::source(&self.#member) instead of returning the wrapped field itself. This skips the immediate cause in the error chain: a transparent wrapper over io::Error will now return None because it queries io::Error::source() rather than returning Some(&io_error). Downstream consumers walking the chain will miss the wrapped error entirely. The transparent impls should return the field (or its Option contents) as the source, mirroring thiserror, instead of delegating to the inner error’s own source().
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
Summary
masterror-deriveproc-macro crate that reimplements theErrorderive using the shared parser frommasterror-templatemasterror::Errorand re-export the template helpers from the internal crateTesting
https://chatgpt.com/codex/tasks/task_e_68cca81c89d0832b95fbcceefc305db1