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

tests: Remove unused dependencies #1043

Merged
merged 2 commits into from May 3, 2024

Conversation

caspermeijn
Copy link
Collaborator

Found these unused dependencies using: cargo +nightly udeps && cargo +nightly udeps --all-targets

@gibbz00
Copy link
Contributor

gibbz00 commented Apr 27, 2024

I would suggest adding this step to CI. E.g.

  unused_deps:
    name: Check for unused dependencies
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      ...
      - name: Run cargo-udeps
        uses: aig787/cargo-udeps-action@v1
        with:
          args: --all-features

Unsure if this has to be added in between:

with:
    submodules: 'recursive'
- name: install protoc
  uses: taiki-e/install-action@v2
  with:
    tool: protoc@${{ env.PROTOC_VERSION }}
- name: install ninja
  uses: ./.github/actions/setup-ninja

Also unsure if --benches, --tests, --examples and --bins are enabled by default.

Found these unused dependencies using: `cargo +nightly udeps && cargo +nightly udeps --all-targets`
@caspermeijn
Copy link
Collaborator Author

I would suggest adding this step to CI. E.g.

Good idea.

Unsure if this has to be added in between:

Yes, cargo-udeps does a full build and looks at the linked binary. So all dependencies are required.

Also unsure if --benches, --tests, --examples and --bins are enabled by default.

--all-targets will do that for you: https://doc.rust-lang.org/cargo/commands/cargo-build.html#target-selection

@caspermeijn caspermeijn added this pull request to the merge queue May 3, 2024
Merged via the queue into tokio-rs:master with commit 71b8e8e May 3, 2024
15 checks passed
@caspermeijn caspermeijn deleted the remove_log branch May 3, 2024 08:41
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.

None yet

2 participants