Skip to content

Commit

Permalink
Update tests to display dep-req info for dep-chain
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Aug 23, 2021
1 parent 70a3ccb commit 0afd40b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions crates/resolver-tests/tests/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ fn cyclic_good_error_message() {
assert_eq!("\
cyclic package dependency: package `A v0.0.0 (registry `https://example.com/`)` depends on itself. Cycle:
package `A v0.0.0 (registry `https://example.com/`)`
... which is depended on by `C v0.0.0 (registry `https://example.com/`)`
... which is depended on by `A v0.0.0 (registry `https://example.com/`)`\
... which satisfies dependency `A = \"*\"` of package `C v0.0.0 (registry `https://example.com/`)`
... which satisfies dependency `C = \"*\"` of package `A v0.0.0 (registry `https://example.com/`)`\
", error.to_string());
}
20 changes: 10 additions & 10 deletions tests/testsuite/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,14 +1096,14 @@ 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 ([..])`
... which satisfies dependency `qux = \"^0.1.0\"` of package `foo v0.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.
previously selected package `bad v1.0.0`
... which is depended on by `baz v0.1.0`
... which is depended on by `foo v0.0.1 ([..])`
... which satisfies dependency `bad = \"=1.0.0\"` of package `baz v0.1.0`
... which satisfies dependency `baz = \"^0.1.0\"` of package `foo v0.0.1 ([..])`
failed to select a version for `bad` which could resolve this conflict",
)
Expand Down Expand Up @@ -1147,12 +1147,12 @@ 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.
previously selected package `bad v2.0.1`
... which is depended on by `baz v0.1.0`
... which is depended on by `foo v0.0.1 ([..])`
... which satisfies dependency `bad = \">=2.0.1\"` of package `baz v0.1.0`
... which satisfies dependency `baz = \"^0.1.0\"` of package `foo v0.0.1 ([..])`
previously selected package `bad v1.0.0`
... which is depended on by `bar v0.1.0`
... which is depended on by `foo v0.0.1 ([..])`
... which satisfies dependency `bad = \"=1.0.0\"` of package `bar v0.1.0`
... which satisfies dependency `bar = \"^0.1.0\"` of package `foo v0.0.1 ([..])`
failed to select a version for `bad` which could resolve this conflict",
)
Expand Down Expand Up @@ -1662,7 +1662,7 @@ fn self_dependency() {
"\
[ERROR] cyclic package dependency: package `test v0.0.0 ([CWD])` depends on itself. Cycle:
package `test v0.0.0 ([CWD])`
... which is depended on by `test v0.0.0 ([..])`",
... which satisfies path dependency `test` of package `test v0.0.0 ([..])`",
)
.run();
}
Expand Down Expand Up @@ -2808,8 +2808,8 @@ fn cyclic_deps_rejected() {
.with_stderr(
"[ERROR] cyclic package dependency: package `a v0.0.1 ([CWD]/a)` depends on itself. Cycle:
package `a v0.0.1 ([CWD]/a)`
... which is depended on by `foo v0.0.1 ([CWD])`
... which is depended on by `a v0.0.1 ([..])`",
... which satisfies path dependency `a` of package `foo v0.0.1 ([CWD])`
... which satisfies path dependency `foo` of package `a v0.0.1 ([..])`",
).run();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ fn links_duplicates_deep_dependency() {
.with_stderr("\
error: failed to select a version for `a-sys`.
... required by package `a v0.5.0 ([..])`
... which is depended on by `foo v0.5.0 ([..])`
... which satisfies path dependency `a` of package `foo v0.5.0 ([..])`
versions that meet the requirements `*` are: 0.5.0
the package `a-sys` links to the native library `a`, but it conflicts with a previous package which links to `a` as well:
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1618,10 +1618,10 @@ fn cycle() {
.with_stderr(
"\
[UPDATING] [..]
error: cyclic package dependency: [..]
[ERROR] cyclic package dependency: [..]
package `[..]`
... which is depended on by `[..]`
... which is depended on by `[..]`
... which satisfies dependency `[..]` of package `[..]`
... which satisfies dependency `[..]` of package `[..]`
",
)
.run();
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,8 @@ fn deep_path_error() {
.with_stderr(
"\
[ERROR] failed to get `c` as a dependency of package `b v0.1.0 [..]`
... which is depended on by `a v0.1.0 [..]`
... which is depended on by `foo v0.1.0 [..]`
... which satisfies path dependency `b` of package `a v0.1.0 [..]`
... which satisfies path dependency `a` of package `foo v0.1.0 [..]`
Caused by:
failed to load source for dependency `c`
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ 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`
... which is depended on by `foo [..]`
... which satisfies dependency `bar = \"*\"` of package `foo [..]`
",
)
.run();
Expand Down

0 comments on commit 0afd40b

Please sign in to comment.