Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

How to make libraries that use error-chain and error-chain-derive parametric over the feature backtrace? #158

Open
golddranks opened this issue Jun 19, 2017 · 2 comments

Comments

@golddranks
Copy link
Contributor

I'm having a problem with dotenv which uses both error-chain and error-chain-derive:
https://github.com/slapresta/rust-dotenv/issues/65

This isn't a specific problem of dotenv, but any library that uses error-chain and error-chain-derive as a combination and still wants to provide full flexibility to let the users decide whether to enable backtraces or not.

It may be that the feature system is fundamentally ill-posed for such a problem. What do you think?

@golddranks golddranks changed the title How to make libraries that use error-chain and error-chain-derive parametric over the feature backtrace? How to make libraries that use error-chain and error-chain-derive parametric over the feature backtrace? Jun 19, 2017
@Yamakaky
Copy link
Contributor

Yeah, it's a problem. See Arnavion/derive-error-chain#11 (comment) for some discussion about common code path.

@Arnavion
Copy link

Arnavion commented Aug 7, 2017

I don't think derive-error-chain is involved, right? It seems to me the situation is that crate A uses error-chain with the backtrace feature and does not expose a feature to turn it off, so crate B that wants to use error-chain without the backtrace feature can't do that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants