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

Clean up dependencies #474

Merged
merged 2 commits into from
Nov 7, 2022
Merged

Clean up dependencies #474

merged 2 commits into from
Nov 7, 2022

Conversation

flub
Copy link
Contributor

@flub flub commented Nov 7, 2022

This contains two commits:

  • Removes unused dependencies.
  • Sorts dependencies in Cargo.tom files.

This is meant to be committed without squashing, see the commit messages for details.

If the 2nd commit is too controversial I'm happy to remove it.

@flub flub requested a review from Arqu November 7, 2022 10:01
Copy link
Collaborator

@Arqu Arqu left a comment

Choose a reason for hiding this comment

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

LGTM but lets get the GHA ubuntu CI to pass too.

@flub
Copy link
Contributor Author

flub commented Nov 7, 2022

Needs to have #475 merged (and rebasing) to pass CI.

Copy link
Member

@b5 b5 left a comment

Choose a reason for hiding this comment

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

Thank you for sorting imports! huge pet peve of mine. Can this PR also add a note to DEVELOPERS.md that requests any dependency change keep deps sorted. Seems obvious, but it's important to have something to point to so contributors aren't frustrated with unspoken rules.

I think we should add a new section on dependencies with the following language:

Dependencies

Any crate added to iroh will need to use a license compatible with ours. Any PR that introduces a new crate will require additional review time to audit the crate being introduced, including rationale on why you chose this crate, and what alternatives you considered will speed up the review process.

Crate lists in Cargo.toml files must be kept alphabetically sorted.

@flub
Copy link
Contributor Author

flub commented Nov 7, 2022

@b5 great, added that

These have been found by `cargo +nightly udeps --all-targets`.
Leaving them in does not affect final binaries but does increase
compilation time.
Makes it easier to find items and keeps things consistent,
e.g. cargo-add will keep lines sorted if they already are sorted.
@flub
Copy link
Contributor Author

flub commented Nov 7, 2022

PTAL, is rebased on main and developers docs are updated.

Copy link
Collaborator

@Arqu Arqu left a comment

Choose a reason for hiding this comment

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

👍

@flub flub merged commit 54b0830 into main Nov 7, 2022
@flub flub deleted the flub/unused-deps branch November 22, 2022 08:44
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