-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix dependency injection: use localised packages #39
Conversation
So far we injected the local workspace when building the unpacked package. However, when we are in a workspace with changes compared to dependencies that are already released, cargo sometimes pulls in the remote and local package in the check then has dependency mismatches. This change fixes that by collecting the locally build packages during the checking-process, and injects only those that it previously build. This prevents the issue by not ever introducing packages from the local workspace.
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.
Implementation LGTM as we discussed, it'd be great to add a comment with rationale
src/commands/check.rs
Outdated
@@ -319,14 +305,29 @@ pub fn check<'a>( | |||
}; | |||
|
|||
c.shell().status("Checking", "Packages")?; | |||
|
|||
|
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.
nit: Extra line
src/commands/check.rs
Outdated
@@ -319,14 +305,29 @@ pub fn check<'a>( | |||
}; | |||
|
|||
c.shell().status("Checking", "Packages")?; | |||
|
|||
|
|||
|
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.
It'd be great to at least add a terse comment explaining why we can't calculate all of that beforehand, as we did before
Rustfmt is unhappy:
|
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.
LGTM, thanks!
So far we injected the local workspace when building the unpacked package.
However, when we are in a workspace with changes compared to dependencies
that are already released, cargo sometimes pulls in the remote and local
package in the check then has dependency mismatches.
This change fixes that by collecting the locally build packages during the
checking-process, and injects only those that it previously build. This
prevents the issue by not ever introducing packages from the local workspace.