Byron/prodash

`cargo run --example dashboard` doesn't work on a fresh clone

behnam opened this issue · 3 comments

Hi! I just got a fresh clone to try out the examples, as suggested in https://github.com/Byron/prodash#how-to-use, but there seem to be some configuration needed.

First, I did:

$ git clone https://github.com/Byron/prodash
$ cd prodash

Then getting this error when trying to run the example:

$ cargo run --example dashboard
warning: /Users/behnam/code/rust-libs/prodash/Cargo.toml: file found to be present in multiple build targets: /Users/behnam/code/rust-libs/prodash/examples/dashboard.rs
error: target `dashboard` in package `prodash` requires the features: `render-tui`, `render-tui-crossterm`, `render-line`, `render-line-crossterm`, `ctrlc`
Consider enabling them by passing, e.g., `--features="render-tui render-tui-crossterm render-line render-line-crossterm ctrlc"`

Of course, it works when the features are enabled:

cargo run --features render-tui,render-tui-crossterm,render-line,render-line-crossterm,ctrlc --example dashboard

Probably the README can be updated to provide a one-liner for running the tests?


I'm on:

rustc 1.47.0 (18bf6b4f0 2020-10-07)
cargo 1.47.0 (f3c7e066a 2020-08-28)
Byron commented

Thanks for the hint! The README has been updated.
In case it's of interest, I used the 'edit' button directly in browser to make this change, which would also have worked for you creating a fork + PR automatically. Super practical for fly-by fixes like these and faster than creating an issue.

Thanks, @Byron.

I reported here, since I wasn't sure which way you prefer to address it. I thought maybe you would like to use the shorter forms, like cargo run --all-features --example dashboard.

Anyways, should be good for users now. :)

Byron commented

Thanks @behnam for the clarification - I hope I can be perceived as pragmatist though, and if this isn't the case I would be glad to hear your feedback in order to make the necessary changes :).

cargo run --all-features --example dashboard is so much better, and will look way more inviting in the README.
Now is the time to become a contributor :), I am looking forward to a PR.