Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Remove anyhow, structopt from lib dependencies #7

Closed
Urhengulas opened this issue Mar 10, 2021 · 5 comments · Fixed by #10
Closed

Remove anyhow, structopt from lib dependencies #7

Urhengulas opened this issue Mar 10, 2021 · 5 comments · Fixed by #10

Comments

@Urhengulas
Copy link
Contributor

Hi @tmplt,

I'd appreciate if we could remove anyhow and structopt from the dependency tree of the library, since they are not required for it, but only the bin, as you also state in the Cargo.toml.

What do you think about this?

@tmplt
Copy link
Member

tmplt commented Mar 11, 2021 via email

@Urhengulas
Copy link
Contributor Author

Johann Hemmann notifications@github.com writes:
What do you think about this?
Of course. But apparently there is no easy way to separate bin/lib dependencies. See <rust-lang/cargo#1982>. An alternative is to split the crate in two, but I would prefer not to.

I see that this is a bit more complicated than expected and understand that you'd like to keep the crates combined. I will think about a approach and propose it here 😄

@tmplt
Copy link
Member

tmplt commented Mar 11, 2021 via email

@Urhengulas
Copy link
Contributor Author

So what do you think of the idea of hiding the deps behind a cargo feature bin. This feature is enabled by default, but as a library user I can easily get rid of them by setting default-features=false.

See Urhengulas@df9fe04

@tmplt
Copy link
Member

tmplt commented Mar 12, 2021 via email

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

Successfully merging a pull request may close this issue.

2 participants