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

Update: Fully update all transitive dependencies via cargo update --recursive #1234

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dbast
Copy link
Contributor

@dbast dbast commented Nov 14, 2024

This is maybe a controversial PR, but I found this while working on #1226

Dependabot seems to only take care of package versions in Cargo.toml and then only updates related transitive packages in Cargo.lock if the pinning constrains of the updated package changes. BUT dependabot never looks at all the transitive dependencies listed in the Cargo.lock and updating all of them to the newest version within the constrains.

Thus this PR fully updates all transitive dependencies (which is a lot) via running cargo update --recursive and committing that. Reveals lots of outdated versions.

Any better approach to do that? (A github workflow doing that and creating a PR every week could be one option... didn't find a way to convince dependabot to fully take care of transitive dependencies).

@dbast dbast requested a review from cafkafk as a code owner November 14, 2024 17:00
@dbast dbast force-pushed the update branch 2 times, most recently from 3e7fc4a to 3cdc8b0 Compare November 14, 2024 17:12
@dbast dbast marked this pull request as draft November 14, 2024 17:12
@dbast
Copy link
Contributor Author

dbast commented Nov 14, 2024

produces the error:

 error: package `clap v4.5.21` cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.70.0
  Either upgrade to rustc 1.74 or newer, or use
  cargo update -p [email protected] --precise ver

@dbast
Copy link
Contributor Author

dbast commented Nov 15, 2024

One package has to be kept at an older version due to rustc 1.70.0 compatibility. Done via second commit containing the result of cargo update -p [email protected] --precise 4.4.18

@dbast dbast marked this pull request as ready for review November 15, 2024 16:22
@dbast
Copy link
Contributor Author

dbast commented Nov 15, 2024

Ready for review :)

Done via `cargo update -p [email protected] --precise 2.5.0`
@dbast
Copy link
Contributor Author

dbast commented Nov 16, 2024

Updating url only to 2.5.0 (instead of 2.5.3) massively reduces the overall PR diff from +477 -280 lines to +213 -256 by not introducing that many new transitive dependencies... full update then to be done via further PRs. Maybe that makes this more acceptable.

Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

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

One package has to be kept at an older version due to rustc 1.70.0 compatibility. Done via second commit containing the result of cargo update -p [email protected] --precise 4.4.18

This is the actually most controversial bit, we need to ensure that a reasonable amount of downstream dependencies are actually on 1.74 or above before moving the MSRV, but I think we should if we can

@dbast
Copy link
Contributor Author

dbast commented Nov 22, 2024

The tests are passing with rust 1.70.0 by keeping clap at an older version. Anything else to be done for this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants