ci: update dupe check to whitelist syn

This commit is contained in:
Andrew Poelstra 2023-03-18 22:08:45 +00:00
parent 6aa640ff8d
commit ee9b297e98
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 8 additions and 1 deletions

View File

@ -31,7 +31,14 @@ fi
# We should not have any duplicate dependencies. This catches mistakes made upgrading dependencies # We should not have any duplicate dependencies. This catches mistakes made upgrading dependencies
# in one crate and not in another (e.g. upgrade bitcoin_hashes in bitcoin but not in secp). # in one crate and not in another (e.g. upgrade bitcoin_hashes in bitcoin but not in secp).
duplicate_dependencies=$(cargo tree --target=all --all-features --duplicates | wc -l) duplicate_dependencies=$(
# Only show the actual duplicated deps, not their reverse tree, then
# whitelist the 'syn' crate which is duplicated but it's not our fault.
cargo tree --target=all --all-features --duplicates \
| grep '^[0-9A-Za-z]' \
| grep -v 'syn' \
| wc -l
)
if [ "$duplicate_dependencies" -ne 0 ]; then if [ "$duplicate_dependencies" -ne 0 ]; then
echo "Dependency tree is broken, contains duplicates" echo "Dependency tree is broken, contains duplicates"
cargo tree --target=all --all-features --duplicates cargo tree --target=all --all-features --duplicates