Skip to content

Commit b719272

Browse files
committed
Switch to using existing is_locked implementation
semver hasn't merged the upstream PR (yet)
1 parent 8064909 commit b719272

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ percent-encoding = "2.0"
5252
remove_dir_all = "0.5.2"
5353
rustfix = "0.5.0"
5454
same-file = "1"
55-
semver = { git = "https://github.com/illicitonion/semver.git", rev = "f1f912703f67ed63b751c525839731a90239bdcf", features = ["serde"] }
55+
semver = { version = "0.9.0", features = ["serde"] }
5656
serde = { version = "1.0.82", features = ["derive"] }
5757
serde_ignored = "0.1.0"
5858
serde_json = { version = "1.0.30", features = ["raw_value"] }

crates/resolver-tests/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ fn meta_test_deep_pretty_print_registry() {
734734
"vec![pkg!((\"foo\", \"1.0.1\") => [dep_req(\"bar\", \"^1\"),]),\
735735
pkg!((\"foo\", \"1.0.0\") => [dep_req(\"bar\", \"^2\"),]),\
736736
pkg!((\"foo\", \"2.0.0\") => [dep(\"bar\"),]),\
737-
pkg!((\"bar\", \"1.0.0\") => [dep_req(\"baz\", \"=1.0.2\"),dep_req(\"other\", \"^1\"),]),\
738-
pkg!((\"bar\", \"2.0.0\") => [dep_req(\"baz\", \"=1.0.1\"),]),\
737+
pkg!((\"bar\", \"1.0.0\") => [dep_req(\"baz\", \"= 1.0.2\"),dep_req(\"other\", \"^1\"),]),\
738+
pkg!((\"bar\", \"2.0.0\") => [dep_req(\"baz\", \"= 1.0.1\"),]),\
739739
pkg!((\"baz\", \"1.0.2\") => [dep_req(\"other\", \"^2\"),]),\
740740
pkg!((\"baz\", \"1.0.1\")),\
741741
pkg!((\"cat\", \"1.0.2\") => [dep_req_kind(\"other\", \"^2\", DepKind::Build, false),]),\

src/cargo/ops/cargo_install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ fn installed_exact_package<T>(
559559
where
560560
T: Source,
561561
{
562-
if !dep.version_req().is_exact() {
562+
if !dep.is_locked() {
563563
// If the version isn't exact, we may need to update the registry and look for a newer
564564
// version - we can't know if the package is installed without doing so.
565565
return Ok(None);

tests/testsuite/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ fn incompatible_dependencies() {
10231023
error: failed to select a version for `bad`.
10241024
... required by package `qux v0.1.0`
10251025
... which is depended on by `foo v0.0.1 ([..])`
1026-
versions that meet the requirements `>=1.0.1` are: 1.0.2, 1.0.1
1026+
versions that meet the requirements `>= 1.0.1` are: 1.0.2, 1.0.1
10271027
10281028
all possible versions conflict with previously selected packages.
10291029
@@ -1068,7 +1068,7 @@ fn incompatible_dependencies_with_multi_semver() {
10681068
"\
10691069
error: failed to select a version for `bad`.
10701070
... required by package `foo v0.0.1 ([..])`
1071-
versions that meet the requirements `>=1.0.1, <=2.0.0` are: 2.0.0, 1.0.1
1071+
versions that meet the requirements `>= 1.0.1, <= 2.0.0` are: 2.0.0, 1.0.1
10721072
10731073
all possible versions conflict with previously selected packages.
10741074

tests/testsuite/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fn bad_version() {
175175
.with_stderr(
176176
"\
177177
[UPDATING] [..] index
178-
[ERROR] could not find `foo` in registry `[..]` with version `=0.2.0`
178+
[ERROR] could not find `foo` in registry `[..]` with version `= 0.2.0`
179179
",
180180
)
181181
.run();

tests/testsuite/install_upgrade.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ fn already_installed_updates_yank_status_on_upgrade() {
802802
.with_stderr(
803803
"\
804804
[UPDATING] `[..]` index
805-
[ERROR] could not find `foo` in registry `[..]` with version `=1.0.1`
805+
[ERROR] could not find `foo` in registry `[..]` with version `= 1.0.1`
806806
",
807807
)
808808
.run();

tests/testsuite/registry.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ fn wrong_version() {
223223
.with_status(101)
224224
.with_stderr_contains(
225225
"\
226-
error: failed to select a version for the requirement `foo = \">=1.0.0\"`
226+
error: failed to select a version for the requirement `foo = \">= 1.0.0\"`
227227
candidate versions found which didn't match: 0.0.2, 0.0.1
228228
location searched: `[..]` index (which is replacing registry `[..]`)
229229
required by package `foo v0.0.1 ([..])`
@@ -238,7 +238,7 @@ required by package `foo v0.0.1 ([..])`
238238
.with_status(101)
239239
.with_stderr_contains(
240240
"\
241-
error: failed to select a version for the requirement `foo = \">=1.0.0\"`
241+
error: failed to select a version for the requirement `foo = \">= 1.0.0\"`
242242
candidate versions found which didn't match: 0.0.4, 0.0.3, 0.0.2, ...
243243
location searched: `[..]` index (which is replacing registry `[..]`)
244244
required by package `foo v0.0.1 ([..])`
@@ -543,7 +543,7 @@ fn relying_on_a_yank_is_bad() {
543543
.with_status(101)
544544
.with_stderr_contains(
545545
"\
546-
error: failed to select a version for the requirement `baz = \"=0.0.2\"`
546+
error: failed to select a version for the requirement `baz = \"= 0.0.2\"`
547547
candidate versions found which didn't match: 0.0.1
548548
location searched: `[..]` index (which is replacing registry `[..]`)
549549
required by package `bar v0.0.1`

tests/testsuite/replace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ fn override_wrong_name() {
549549
Caused by:
550550
no matching package for override `[..]baz:0.1.0` found
551551
location searched: file://[..]
552-
version required: =0.1.0
552+
version required: = 0.1.0
553553
",
554554
)
555555
.run();

0 commit comments

Comments
 (0)