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

cargo-deny #1698

Merged
merged 6 commits into from
Apr 12, 2022
Merged

cargo-deny #1698

merged 6 commits into from
Apr 12, 2022

Conversation

emilk
Copy link
Contributor

@emilk emilk commented Apr 11, 2022

cargo-deny is an amazing tool that protects from:

  • duplicated crates (code bloat)
  • copy-left licenses in the dependency tree
  • RUSTSEC advisories

In this case it discovered the duplication of jpeg-decoder and miniz_oxide, caused by the tiff and flate2 crates. Until new releases of tiff and flate2 are published I opted to ignore these duplicated crates in the deny.toml file. EDIT: new versions of tiff and flate2 have been published, removing the duplication.

Adding cargo-deny to the CI will prevent more dependency duplication, hence this unsolicited PR.


I license past and future contributions under the dual MIT/Apache-2.0 license,
allowing licensees to chose either at their option.

[cargo-deny](https://github.com/EmbarkStudios/cargo-deny) is an amazing tool that protects from:

* duplicated crates (code bloat)
* copy-left licenses in the dependency tree
* RUSTSEC advisories

In this case it discovered the duplication of 'jpeg-decoder' and 'miniz_oxide', both because of the 'tiff' crate.

Until we can update the tiff crate and resolve those problem I opted to ignore these duplicated crated in the deny.toml file.

Adding cargo-deny to the CI will prevent more dependency duplication, hence this unsolicited PR.
@emilk emilk marked this pull request as ready for review April 11, 2022 11:27
@fintelia
Copy link
Contributor

How widely used is cargo-deny? The duplicated crate and RUSTSEC detection are both very welcome additions, though I'm slightly less convinced about adopting a policy to ban specific open source licenses.

@emilk
Copy link
Contributor Author

emilk commented Apr 11, 2022

It's hard to gauge how widely used cargo-deny is, but I know a lot of companies use it (and it is backed by one).

It can be configured extensively so that that, for instance, the license check is disabled.

For commercial software, keeping copy-left licenses out can be critical, but it is of course less important for libraries such as the image crate. If one image decoder uses GPL code, then a commercial software can still use the image crate if it disables the feature flag that brings in the offending decoder.

new versions of image-tiff and flate2 has been published
@emilk
Copy link
Contributor Author

emilk commented Apr 12, 2022

I removed the license check, and because new versions of tiff and flate2 have been published, I removed the exemptions for the crate duplicaiton of miniz_oxide and jpeg-decoder.

deny.toml Show resolved Hide resolved
deny.toml Show resolved Hide resolved
@HeroicKatora HeroicKatora merged commit 8860c3d into image-rs:master Apr 12, 2022
@emilk
Copy link
Contributor Author

emilk commented Apr 12, 2022

Thanks for merging this! This will help a lot in keeping my dependency tree nice and tidy, and free of duplicates ❤️

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