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

Update cargo dependency #43

Closed
kraai opened this issue Dec 4, 2018 · 3 comments
Closed

Update cargo dependency #43

kraai opened this issue Dec 4, 2018 · 3 comments

Comments

@kraai
Copy link
Contributor

kraai commented Dec 4, 2018

Would you please update the dependency on cargo to the latest version, 0.31? I'd like to package cargo-lichking for Debian and build it against cargo 0.31 so that we don't have to package an old version of cargo.

@Nemo157
Copy link
Owner

Nemo157 commented Dec 4, 2018

I can probably find time to do that sometime in the next week, as long as the APIs haven't changed too much. If anyone else feels like submitting a PR for it I'd be very happy to merge it.

@kraai
Copy link
Contributor Author

kraai commented Dec 4, 2018

I've posted my work in progress branch at https://github.com/kraai/cargo-lichking/tree/update-cargo. There's one more error to resolve:

   Compiling cargo-lichking v0.6.0 (/home/kraai/src/cargo-lichking)                                                                                   
error[E0277]: `cargo::CliError` doesn't implement `std::fmt::Display`                                                                                 
  --> src/main.rs:31:24                                                                                                                               
   |                                                                                                                                                  
31 |         config.shell().error(err).expect("Can't do much");                                                                                       
   |                        ^^^^^ `cargo::CliError` cannot be formatted with the default formatter                                                    
   |                                                                                                                                                  
   = help: the trait `std::fmt::Display` is not implemented for `cargo::CliError`                                                                     
   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead                                                        
                                                                                                                                                      
error: aborting due to previous error                                                                                                                 
                                                                                                                                                      
For more information about this error, try `rustc --explain E0277`.                                                                                   
error: Could not compile `cargo-lichking`.                                                                                                            

To learn more, run the command again with --verbose.

@Nemo157
Copy link
Owner

Nemo157 commented Dec 4, 2018

I think the best thing there would be to check if there's a CargoError on err.error and print that, otherwise just a generic "something went wrong" message.

EDIT: Also, should probably use the specified exit code from the error instead of just 1.

@kraai kraai mentioned this issue Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants