]> git.proxmox.com Git - cargo.git/commitdiff
Switch to using existing is_locked implementation
authorDaniel Wagner-Hall <dawagner@gmail.com>
Wed, 20 May 2020 19:38:23 +0000 (20:38 +0100)
committerDaniel Wagner-Hall <dawagner@gmail.com>
Wed, 20 May 2020 19:38:23 +0000 (20:38 +0100)
semver hasn't merged the upstream PR (yet)

Cargo.toml
crates/resolver-tests/src/lib.rs
src/cargo/ops/cargo_install.rs
tests/testsuite/build.rs
tests/testsuite/install.rs
tests/testsuite/install_upgrade.rs
tests/testsuite/registry.rs
tests/testsuite/replace.rs

index e1a6e06b9d3023245a9a6f654aa92f28c3f91472..ef5857b845b96660a2e165442f396d4c8b3e07ca 100644 (file)
@@ -52,7 +52,7 @@ percent-encoding = "2.0"
 remove_dir_all = "0.5.2"
 rustfix = "0.5.0"
 same-file = "1"
-semver = { git = "https://github.com/illicitonion/semver.git", rev = "f1f912703f67ed63b751c525839731a90239bdcf", features = ["serde"] }
+semver = { version = "0.9.0", features = ["serde"] }
 serde = { version = "1.0.82", features = ["derive"] }
 serde_ignored = "0.1.0"
 serde_json = { version = "1.0.30", features = ["raw_value"] }
index a1cdb9d11a2b845078b7df59ca31458cd9bc92a7..ef47f11ffc555f293f3e91dfba6e192028cf5288 100644 (file)
@@ -734,8 +734,8 @@ fn meta_test_deep_pretty_print_registry() {
         "vec![pkg!((\"foo\", \"1.0.1\") => [dep_req(\"bar\", \"^1\"),]),\
          pkg!((\"foo\", \"1.0.0\") => [dep_req(\"bar\", \"^2\"),]),\
          pkg!((\"foo\", \"2.0.0\") => [dep(\"bar\"),]),\
-         pkg!((\"bar\", \"1.0.0\") => [dep_req(\"baz\", \"=1.0.2\"),dep_req(\"other\", \"^1\"),]),\
-         pkg!((\"bar\", \"2.0.0\") => [dep_req(\"baz\", \"=1.0.1\"),]),\
+         pkg!((\"bar\", \"1.0.0\") => [dep_req(\"baz\", \"= 1.0.2\"),dep_req(\"other\", \"^1\"),]),\
+         pkg!((\"bar\", \"2.0.0\") => [dep_req(\"baz\", \"= 1.0.1\"),]),\
          pkg!((\"baz\", \"1.0.2\") => [dep_req(\"other\", \"^2\"),]),\
          pkg!((\"baz\", \"1.0.1\")),\
          pkg!((\"cat\", \"1.0.2\") => [dep_req_kind(\"other\", \"^2\", DepKind::Build, false),]),\
index 9434b1b3def7073c4da85044f02e81a83e203ea6..9b1b08a7254378db626633105605a6174ac8d10d 100644 (file)
@@ -559,7 +559,7 @@ fn installed_exact_package<T>(
 where
     T: Source,
 {
-    if !dep.version_req().is_exact() {
+    if !dep.is_locked() {
         // If the version isn't exact, we may need to update the registry and look for a newer
         // version - we can't know if the package is installed without doing so.
         return Ok(None);
index 93b652fb241ce7e36e276958931a22fbad4ecaa8..dc987c6e6028029b92f598bb2de18c757872a9b5 100644 (file)
@@ -1023,7 +1023,7 @@ fn incompatible_dependencies() {
 error: failed to select a version for `bad`.
     ... required by package `qux v0.1.0`
     ... which is depended on by `foo v0.0.1 ([..])`
-versions that meet the requirements `>=1.0.1` are: 1.0.2, 1.0.1
+versions that meet the requirements `>= 1.0.1` are: 1.0.2, 1.0.1
 
 all possible versions conflict with previously selected packages.
 
@@ -1068,7 +1068,7 @@ fn incompatible_dependencies_with_multi_semver() {
             "\
 error: failed to select a version for `bad`.
     ... required by package `foo v0.0.1 ([..])`
-versions that meet the requirements `>=1.0.1, <=2.0.0` are: 2.0.0, 1.0.1
+versions that meet the requirements `>= 1.0.1, <= 2.0.0` are: 2.0.0, 1.0.1
 
 all possible versions conflict with previously selected packages.
 
index 01a81fc3e290348d2ef74275f74b3f6feec93b25..68bcf22e8b0033a09d5577ef2e0a6832032b7837 100644 (file)
@@ -175,7 +175,7 @@ fn bad_version() {
         .with_stderr(
             "\
 [UPDATING] [..] index
-[ERROR] could not find `foo` in registry `[..]` with version `=0.2.0`
+[ERROR] could not find `foo` in registry `[..]` with version `= 0.2.0`
 ",
         )
         .run();
index 41f00087126aafb0112023a9e0fce47f1f3d9d9a..59a904d5854b3530f1ab7e9dced9128e3b96e04b 100644 (file)
@@ -802,7 +802,7 @@ fn already_installed_updates_yank_status_on_upgrade() {
         .with_stderr(
             "\
 [UPDATING] `[..]` index
-[ERROR] could not find `foo` in registry `[..]` with version `=1.0.1`
+[ERROR] could not find `foo` in registry `[..]` with version `= 1.0.1`
 ",
         )
         .run();
index 0197facaef733910b37065ad1c41f237dcf8fb01..e298e23e6251da3f41e21a6299ad67452822bfd2 100644 (file)
@@ -223,7 +223,7 @@ fn wrong_version() {
         .with_status(101)
         .with_stderr_contains(
             "\
-error: failed to select a version for the requirement `foo = \">=1.0.0\"`
+error: failed to select a version for the requirement `foo = \">= 1.0.0\"`
   candidate versions found which didn't match: 0.0.2, 0.0.1
   location searched: `[..]` index (which is replacing registry `[..]`)
 required by package `foo v0.0.1 ([..])`
@@ -238,7 +238,7 @@ required by package `foo v0.0.1 ([..])`
         .with_status(101)
         .with_stderr_contains(
             "\
-error: failed to select a version for the requirement `foo = \">=1.0.0\"`
+error: failed to select a version for the requirement `foo = \">= 1.0.0\"`
   candidate versions found which didn't match: 0.0.4, 0.0.3, 0.0.2, ...
   location searched: `[..]` index (which is replacing registry `[..]`)
 required by package `foo v0.0.1 ([..])`
@@ -543,7 +543,7 @@ fn relying_on_a_yank_is_bad() {
         .with_status(101)
         .with_stderr_contains(
             "\
-error: failed to select a version for the requirement `baz = \"=0.0.2\"`
+error: failed to select a version for the requirement `baz = \"= 0.0.2\"`
   candidate versions found which didn't match: 0.0.1
   location searched: `[..]` index (which is replacing registry `[..]`)
 required by package `bar v0.0.1`
index 9672c4629740013529a8786c40fb5fc3af055970..17149fa6d93d28333764a7775b15ffd9059ca66c 100644 (file)
@@ -549,7 +549,7 @@ fn override_wrong_name() {
 Caused by:
   no matching package for override `[..]baz:0.1.0` found
 location searched: file://[..]
-version required: =0.1.0
+version required: = 0.1.0
 ",
         )
         .run();