unused-deps 976 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. # Copyright Materialize, Inc. and contributors. All rights reserved.
  3. #
  4. # Use of this software is governed by the Business Source License
  5. # included in the LICENSE file at the root of this repository.
  6. #
  7. # As of the Change Date specified in that file, in accordance with
  8. # the Business Source License, use of this software will be governed
  9. # by the Apache License, Version 2.0.
  10. #
  11. # unused-deps — prints unused dependencies for all Rust crates.
  12. # Requires https://github.com/est31/cargo-udeps and a working nightly toolchain.
  13. #
  14. # cargo-udeps occasionally produces false positives, especially with
  15. # dependencies that are used only on certain platforms. To ignore these
  16. # dependencies, see:
  17. # https://github.com/est31/cargo-udeps#ignoring-some-of-the-dependencies.
  18. set -euo pipefail
  19. cd "$(dirname "$0")/.."
  20. . misc/shlib/shlib.bash
  21. export RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:=nightly}
  22. cargo udeps --workspace --all-targets --exclude=workspace-hack "$@"