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

Unable to update workspace dependencies #1

Closed
BenJeau opened this issue Oct 15, 2024 · 4 comments · Fixed by #5
Closed

Unable to update workspace dependencies #1

BenJeau opened this issue Oct 15, 2024 · 4 comments · Fixed by #5
Assignees
Labels
bug Something isn't working

Comments

@BenJeau
Copy link
Owner

BenJeau commented Oct 15, 2024

The updating mechanism cargo add ... doesn't support modifying workspace dependencies - rust-lang/cargo#10608

Consider maybe instead modifying directly the Cargo.toml file then running cargo check

@BenJeau BenJeau added the bug Something isn't working label Oct 15, 2024
@BenJeau BenJeau self-assigned this Oct 15, 2024
@dessalines
Copy link

This should be re-opened, as I've found this won't update your workspace projects own Cargo.toml files. This currently only works for the top-level one.

@BenJeau
Copy link
Owner Author

BenJeau commented Jan 15, 2025

Hi @dessalines!

I think what you are describing is just a feature that this CLI tool doesn't support currently. The bug related to this issue was maybe not clear enough, but was about updating the [workspace.dependencies] section within the Cargo.toml file, which cargo add ... doesn't support (which was what this was using initially).

For you use-case, although it is not the best but should work, you could run the tool in every folder where there's a Cargo.toml where you want to update the dependencies. At the moment, the tool only looks and updates the Cargo.toml file at the current working directory.

Let me know if I understand your comment :)

@BenJeau
Copy link
Owner Author

BenJeau commented Jan 15, 2025

Created a new issue #10 regarding updating deps of Cargo.toml files of workspaces.

@dessalines
Copy link

I think what you are describing is just a feature that this CLI tool doesn't support currently.

Ah yep you're correct, thx for opening up a new issue. I'll comment there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants