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

Remove indirect dependencies from tools #3282

Merged
merged 4 commits into from
Jul 24, 2023

Conversation

stmcginnis
Copy link
Contributor

Issue number:

N/A

Description of changes:

Several tools had indirect dependencies included in their Cargo.toml files. These are pulled in by direct dependencies, so they should not be explicitly included in case those dependencies change and they are no longer needed, or require different versions.

Testing done:

Built each tool and verified no compilation errors.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

This removes indirect dependencies from the infrasys Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the pubsys Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the pubsys-setup Cargo.toml
file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the testsys-setup Cargo.toml
file.

Signed-off-by: Sean McGinnis <[email protected]>
@stmcginnis stmcginnis requested review from webern and jpculp July 21, 2023 19:05
Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

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

This is great. Did you use cargo udeps?

@stmcginnis
Copy link
Contributor Author

This is great. Did you use cargo udeps?

I actually used cargo machete. I was reading up on some build time optimization and the author called out both tools, but recommended machete since it does not require the nightly toolchain to work. I didn't do a side-by-side comparison of results, but other than some false positives on our relatively linked modules (model, bottlerocket-release) it seemed to catch everything that wasn't being directly used.

@stmcginnis stmcginnis merged commit 44678a9 into bottlerocket-os:develop Jul 24, 2023
@stmcginnis stmcginnis deleted the tools-dep-cleanup branch July 24, 2023 18:08
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