Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing list of dependancies in example #126

Open
haddow777 opened this issue Apr 13, 2023 · 2 comments
Open

Missing list of dependancies in example #126

haddow777 opened this issue Apr 13, 2023 · 2 comments

Comments

@haddow777
Copy link

Hello. I will admit I am quite new to Rust and so am not familiar with much. I wanted some logging functionality and this library looked good. On the main readme page, there is a link to cmd-program.rs and so I added it to a file to play around with. Unfortunately, it comes up with an error on almost every line as it seems the example code is extremely dependant on other libraries for its functionality.
I've so far managed to piece together exactly which libraries to hunt down and install just to get the example to work, but it seems to me that it would be a lot more helpful to those of us who are new to Rust to have a commented list of library dependancies used in the example code so we don't have to work so hard just to get an example running.
I guess, for anyone who's been working in Rust for any meaningful amount of time, they may likely be familiar with all the libraries used. Still, it would be nice if such lists could be added to the top of the example files for those of us less experienced.
Thank you for your time.

@haddow777
Copy link
Author

Okay, there may be more going on with that example than my inexperience bungling things. I've managed to find and install all the libraries the compiler is complaining are missing and yet the file still has errors. Mainly now, the library Clap doesn't appear to be in line with the code. When I go the the site that lists all Cargo libraries and look up Clap, there is no reference to a clap::App struct at all. I've google around and found references in other places, but as the Cargo site is showing what gets installed, I'm guessing clap::App must be from a fork or is from an old outdated version.
I'm not going to push it as this is already way too much of a headache for what should be a drop in example. I just thought I would let you know that it isn't working. There may still be a good chance I'm bungling something with my noobishness, but then, if a noob can't trust an example to help them understand things, it may not be a great example.
Again, thanks for your time.

@daboross
Copy link
Owner

That's a good call! The fern example are indeed using clap 2.0.0, while the latest version is clap 4. I should definitely update that.

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

No branches or pull requests

2 participants