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

CI: Add cargo-deny #115

Merged
merged 6 commits into from
May 19, 2023
Merged

CI: Add cargo-deny #115

merged 6 commits into from
May 19, 2023

Conversation

emilk
Copy link
Contributor

@emilk emilk commented Mar 27, 2023

cargo deny protects against:

  • Security advisories
  • Duplicate dependencies (which adds compilation time and code bloat)
  • Copy-left licenses, such as GPL

cargo-deny requires a Cargo.lock file. It doesn't have to be checked in, but by checking it in we explicitly say "there is a combination of crate version we can use that produces no duplicate dependencies, no copy-left licenses, and no security advisories". With an implicit Cargo.lock (not checked in) we would get the latest version of all crates at the time that the CI is run, which mean the CI can fail spuriously if a dependency is updated to a new version that, for instance, pulls in a duplicated dependency.

This PR does add some maintenance burden, and I understand if that isn't exactly appealing. However, the use of cargo-deny is a promise to users that this crate is a nice citizen in the rust eco-system, that cares about avoiding duplicate dependencies etc.

@emilk emilk marked this pull request as ready for review March 27, 2023 10:42
@PolyMeilex
Copy link
Owner

Sorry for the delay, I kinda forgot about this one.
Not a huge fan of commiting Cargo.lock but the compromise sounds resonable so LGTM
Thanks!

@PolyMeilex PolyMeilex merged commit c486133 into PolyMeilex:master May 19, 2023
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.

2 participants