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

fix(upgrade): Resolve problems found in #754 #755

Merged
merged 3 commits into from
Jul 27, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(upgrade): Update lockfile dependencies not from registry
  • Loading branch information
epage committed Jul 27, 2022
commit 7dae010dc67c4b7224079015e57b75e2eaa2ff92
6 changes: 1 addition & 5 deletions src/bin/upgrade/upgrade.rs
Original file line number Diff line number Diff line change
@@ -411,11 +411,7 @@ fn load_lockfile(

let result = cmd.exec()?;

let locked = result
.packages
.into_iter()
.filter(|p| p.source.is_some()) // Source is none for local packages
.collect::<Vec<_>>();
let locked = result.packages;

Ok(locked)
}
2 changes: 1 addition & 1 deletion tests/cargo-upgrade/to_lockfile/out/one/Cargo.toml
Original file line number Diff line number Diff line change
@@ -7,4 +7,4 @@ path = "../dummy.rs"

[dependencies]
my-package = "0.2.3"
three = { path = "../implicit/three", version = "0.1.0" }
three = { path = "../implicit/three", version = "0.1.5" }
2 changes: 1 addition & 1 deletion tests/cargo-upgrade/to_lockfile/stderr.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Checking one's dependencies
Upgrading my-package: v0.2.0 -> v0.2.3
warning: ignoring three, could not find package: not in lock file
Upgrading three: v0.1.0 -> v0.1.5
Checking three's dependencies
Upgrading my-package: v0.2.0 -> v0.2.3
Checking two's dependencies