loony-bean / textplots-rs

Terminal plotting library for Rust
234 stars 24 forks source link

lib-version only without structopt dependency #36

Closed dvtomas closed 1 year ago

dvtomas commented 3 years ago

I'm using textplots as a lightweight lib only. Would it be possible to either split it into two crates, or use features, to have a structopt and meval dependencies free build?

dvtomas commented 2 years ago

Hello, anybody has an opinion on this?

dvtomas commented 2 years ago

Useful links:

https://stackoverflow.com/a/47113822

https://github.com/rust-lang/cargo/issues/1982

TDHolmes commented 2 years ago

Makes sense to me. structopt and meval is only used in the binary CLI so I think it might be able to be moved to [dev-dependencies]. should be easy

TDHolmes commented 2 years ago

ah sorry, no it can't, but yeah it could be split into a feature and the CLI bin could be set to require that feature.

dvtomas commented 2 years ago

There's a discussion on how to do that in the "useful links" mentioned above.

dvtomas commented 2 years ago

/cc @micouy

Any thoughts on this yet? IMHO it would be the best and easiest to just make the CLI another example. I'm willing to do a PR if you agree.

dvtomas commented 2 years ago

??

TDHolmes commented 2 years ago

I agree, I just hit this myself causing a duplicate dependency of a different version when I'm just using it as a library. I lean slightly towards the optional dependency or separate crate fix myself though.

ttytm commented 1 year ago

yep, would be great to have those options. Unfortunately, the crate becomes unusable in some cases. Allowing those things to be optionally enabled as features or as separate dependency would solve the issue.

adri326 commented 1 year ago

meval seems to be unmaintained, and it depends on nom = ^1.0.0, which will become rejected in a future version of rust (https://github.com/rust-lang/rust/issues/79813). The possible fixes for this upcoming deprecation are:

dvtomas commented 1 year ago

I think this should go into another issue.

Anyway, If looking for an alternative, I've had a good experience with evalexpr

loony-bean commented 1 year ago

Fixed in #40