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

Support cargo-udeps #17

Merged
merged 1 commit into from
Aug 13, 2022
Merged

Support cargo-udeps #17

merged 1 commit into from
Aug 13, 2022

Conversation

gifnksm
Copy link
Contributor

@gifnksm gifnksm commented Aug 13, 2022

cargo-udeps is a tool to find unused dependencies.
It is useful to keep the binary size of the crate no larger than necessary.

To run cargo-udeps on a crate with many combinations of features, it is better to use GitHub Actions.
I want to use this action to easily use cargo-udeps, so I created this pull request.

This action falls back to cargo-binstall by default when trying to install an unknown package, but it did not work well in my environment.

  • On macOS, an installation by cargo-binstall failed.
    • macOS CI log (Job is successful because the error was ignored)
  • On Linux/Windows, cargo-udeps could not find when cargo directory is restored by a cache

I don't know why this occurred, but with this pull request, the installation succeeded and I was able to use cargo-udeps as expected.

@NobodyXu
Copy link
Collaborator

@gifnksm That's strange since we already use create_dir_all to ensure dirs exist before installing.

@NobodyXu
Copy link
Collaborator

@gifnksm For ubuntu and win, what happened isna caching problem.

cargo-binstall writes metadata about crates installed to $CARGO_HOME/binstall/crates-v1.json and skip when asked to install again.

Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@taiki-e taiki-e merged commit bd71caf into taiki-e:main Aug 13, 2022
@taiki-e
Copy link
Owner

taiki-e commented Aug 13, 2022

Published in 1.11.0.

@gifnksm gifnksm deleted the cargo-udeps branch August 13, 2022 06:19
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

Successfully merging this pull request may close these issues.

3 participants