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

build(rust): Trigger warnings for unused crate dependencies #4402

Closed
wants to merge 3 commits into from

Conversation

jamilbk
Copy link
Member

@jamilbk jamilbk commented Mar 30, 2024

After all of the time spent hunting down all of our fstat calls for #4377, it became clear that our dependency tree is somewhat convoluted and includes a few unused crates and features.

This is a first step to try to clean up some of those.

Refs #4403

Copy link

vercel bot commented Mar 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
firezone ⬜️ Ignored (Inspect) Visit Preview Mar 30, 2024 7:53am

Copy link

github-actions bot commented Mar 30, 2024

Terraform Cloud Plan Output

Plan: 15 to add, 14 to change, 15 to destroy.

Terraform Cloud Plan

@jamilbk jamilbk mentioned this pull request Mar 30, 2024
3 tasks
@jamilbk jamilbk changed the title deps(rust): Trigger warnings for unused crate dependencies build(rust): Trigger warnings for unused crate dependencies Mar 30, 2024
Copy link

github-actions bot commented Mar 30, 2024

Performance Test Results

TCP

Test Name Received/s Sent/s Retransmits
direct-tcp-client2server 224.7 MiB (+0%) 226.8 MiB (+0%) 163 (+26%)
direct-tcp-server2client 225.4 MiB (-1%) 226.6 MiB (-2%) 457 (+67%)
relayed-tcp-client2server 149.3 MiB (+0%) 150.4 MiB (+0%) 214 (+100%)
relayed-tcp-server2client 152.3 MiB (+5%) 152.6 MiB (+5%) 145 (-6%)

UDP

Test Name Total/s Jitter Lost
direct-udp-client2server 50.0 MiB (+0%) 0.30ms (+701%) 0.00% (NaN%)
direct-udp-server2client 50.0 MiB (-0%) 0.01ms (-19%) 0.00% (NaN%)
relayed-udp-client2server 50.0 MiB (-0%) 0.12ms (+73%) 0.00% (NaN%)
relayed-udp-server2client 50.0 MiB (-0%) 0.04ms (-8%) 0.00% (NaN%)

@jamilbk jamilbk marked this pull request as ready for review March 30, 2024 06:50
Copy link
Member

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had success with https://github.com/est31/cargo-udeps in the past.

@@ -34,7 +34,9 @@ jobs:
cargo doc --all-features --no-deps --document-private-items ${{ matrix.packages }}
env:
RUSTDOCFLAGS: "-D warnings"
- run: |
- env:
RUSTFLAGS: "-Wunused-crate-dependencies"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to set this lint in Cargo.toml under the recently introduced lints table.

@jamilbk
Copy link
Member Author

jamilbk commented Apr 3, 2024

Superseded by #4475

@jamilbk jamilbk closed this Apr 3, 2024
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