Skip to content

Workspace based dependencies #154

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

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

acmorrow
Copy link
Member

@acmorrow acmorrow commented Mar 6, 2024

This had been something I'd hoped to do as part of converting to a workspace per #149, but since I didn't finish the work for that PR it wasn't included. It's maybe controversial? I'm not sure.

Anyway, this change moves us to use workspace dependency inheritance for all dependencies in the workspace crates.

The only downside to doing this that I'm aware of is that cargo add doesn't currently have support for adding directly at the workspace level, so if we cargo add a new dependency, we will need to manually pull it up to the top-level Cargo.toml, at least until rust-lang/cargo#10608 gets resolved one way or another.

On the other hand, with this change in place, if we do cargo add of an existing dependency in a new location, it will import it with .workspace = true, which is nice.

Overall, I think this will make it easier to see what dependencies we are declaring at a glance, and easier to make upgrades in one place for crates used in multiple workspace sub-crates.

@acmorrow acmorrow requested a review from a team as a code owner March 6, 2024 21:33
Copy link
Member

@npmenard npmenard left a comment

Choose a reason for hiding this comment

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

LGTM

@acmorrow acmorrow merged commit dc09c06 into viamrobotics:main Mar 7, 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.

2 participants