Skip to content

[Question] Update Cargo Dependencies? #25

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

Closed
kevinmatthes opened this issue Jun 6, 2022 · 6 comments
Closed

[Question] Update Cargo Dependencies? #25

kevinmatthes opened this issue Jun 6, 2022 · 6 comments

Comments

@kevinmatthes
Copy link
Contributor

Since there had been an update to sysexits in the last days, I wondered whether it would be a meaningful enhancement to update all dependency crates to their latest versions.

@kevinmatthes
Copy link
Contributor Author

sysexits, version 0.2.2, runs stable; see https://github.com/kevinmatthes/cargo-optimise.

@wert007
Copy link
Owner

wert007 commented Jun 8, 2022

Since there are not really any changes in that update, and it is only a kind of "patch" update, this is not really necessary. 😅

@kevinmatthes
Copy link
Contributor Author

It was a more general question with sysexits as an example. To preview the crates which have been updated, just delete the Cargo.lock and run cargo b once. This will recreate the file and automatically update the changed crates. To fetch their names comfortably, run git diff -U1 | grep name. On my machine, this gives:

 name = "autocfg"
 name = "libc"
 name = "num-integer"
 name = "num-traits"
 name = "sysexits"

There is also a GitHub feature named "Dependabot" which would automatically update the crates when required. How about this? It would correlate with #8.

@wert007
Copy link
Owner

wert007 commented Jun 9, 2022

Since I just removed getopts as dependency in a pull request, I think most of these should be resolved anyway.

@kevinmatthes
Copy link
Contributor Author

In fact, just two updates could be omitted by doing so. num-integer, num-traits and especially sysexits still need to be updated. The first two crates originate from chrono; sysexits is quite likely to receive an important feature update within the next two weeks, I suppose.

The feature update brings the Display trait implementation in order to format the exit codes to strings which will definitely benefit the error handling, not only for debugging. We could add the information with which exit code the application aborts to the error messages, for example.

@wert007
Copy link
Owner

wert007 commented Jun 9, 2022

Hmm, I think status codes are not too helpful to end users. If they are interested in them, they have a terminal, which will show that code to them. Otherwise the program should just use clear language to describe what exactly went wrong.

wert007 added a commit that referenced this issue Jun 14, 2022
[Enhancement] Fix #25; enhance `Cargo.toml`
wert007 pushed a commit that referenced this issue Jun 24, 2022
wert007 pushed a commit that referenced this issue Jun 24, 2022
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