-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support retrieving workspace of path dependencies in cargo #10550
Support retrieving workspace of path dependencies in cargo #10550
Conversation
stub_request(:get, url + "excluded/Cargo.toml?ref=sha") | ||
.with(headers: { "Authorization" => "token token" }) | ||
.to_return(status: 200, body: member_fixture, headers: json_header) | ||
.to_return(status: 200, body: excluded_fixture, headers: json_header) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo (I assume?) I found when looking at #7649 for reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving based on @RobJellinghaus ' approval :)
Thanks Abdul! Sorry I don't have approver ability myself for some reason, let me know if you can diagnose that. Thanks @Jefffrey for this work! Do you have any other Rust Dependabot issues you are looking at? |
Thanks so much @Jefffrey ! |
Thanks for the review 👍
This was the only one I was looking at |
This led to a regression that causes Dependabot runs to fail in multi-package Cargo workspaces - see #10584. Any chance this could either get reverted or fixed forward? |
…ependabot#10550)" This reverts commit f238da5.
What are you trying to accomplish?
Given a repository like so:
Where
workspace
represents a workspace containing onlynested
, andcli_crate
has a path dependency tonested
, andnested
inherits any property from the root (e.g.edition = { workspace = true }
).If we point dependabot to only
cli_crate
, it will error out when runningcargo update
as though it can fetch the path dependencynested
, it cannot resolve this as it also needs theworkspace
due to this inheritance. Fix Cargo file_fetcher to support this logic of locating the root of a workspace member who is a path dependency, and fetching it.For negative cases, where the root cannot be located or is incorrect, emit an error message (instead of when running
cargo update
which can be confusing to understand).Closes #9533
Anything you want to highlight for special attention from reviewers?
How will you know you've accomplished your goal?
Unit tests added (see reference repository: https://github.com/Jefffrey/dependabot-cargo-test/tree/master)
Checklist