derive-error-chain
derive-error-chain copied to clipboard
Undocumented dependencies
It is undocumented that using a given version of derive_error_chain requires the use of a specific version of error_chain.
For example, to use derive-error-chain = "=0.11.2", one also has to specify error-chain = "=0.11.0" in Cargo.toml. otherwise, one gets unexpected errors from inside the procedural macro (Exact errors depend on specific version combination).
This should either be documented, or otherwise include error-chain as an explicit dependency (since one doesn't even need to extern crate error_chain in one's crate root)
It's documented, but admittedly not in a place where you'd look. https://github.com/Arnavion/derive-error-chain/blame/741135fc0ef00b204e6661eb283ead6e28fc7fb3/CHANGELOG.md#L60
Making error-chain a dependency of this crate will not work. It needs to be a dependency of the crate where the macro is invoked.
I see... I think it's a good idea to put it somewhere near the top of the documentation. It's a pretty important, non-trivial detail (and i spent an hour before i figured it out...)
Is it possible/desirable to lose that dependency? or would that both break compatibility with error_chain and be too much of a hassle?
(of course, the saner alternative is to just document the dependency :P)
Using error-chain's traits is a deliberate decision. https://github.com/Arnavion/derive-error-chain/issues/5
That makes sense.
(Thanks for the cool package, btw :) )