-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit-id:27ea514b
- Loading branch information
Showing
9 changed files
with
99 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,12 +320,10 @@ mod tests { | |
], | ||
&[deps![("top1", "1"), ("top2", "1")]], | ||
Err(indoc! {" | ||
Version solving failed: | ||
- top2 v1.0.0 cannot use foo v1.0.0, because top2 requires foo ^2.0.0 | ||
Scarb does not have real version solving algorithm yet. | ||
Perhaps in the future this conflict could be resolved, but currently, | ||
please upgrade your dependencies to use latest versions of their dependencies. | ||
version solving failed: | ||
Because there is no version of top2 in >1.0.0, <2.0.0 and top2 1.0.0 depends on foo >=2.0.0, <3.0.0, top2 >=1.0.0, <2.0.0 depends on foo >=2.0.0, <3.0.0. | ||
And because top1 1.0.0 depends on foo >=1.0.0, <2.0.0 and there is no version of top1 in >1.0.0, <2.0.0, top1 >=1.0.0, <2.0.0, top2 >=1.0.0, <2.0.0 are incompatible. | ||
And because root_1 1.0.0 depends on top1 >=1.0.0, <2.0.0 and root_1 1.0.0 depends on top2 >=1.0.0, <2.0.0, root_1 1.0.0 is forbidden. | ||
"}), | ||
) | ||
} | ||
|
@@ -335,7 +333,7 @@ mod tests { | |
check( | ||
registry![], | ||
&[deps![("foo", "1.0.0")]], | ||
Err(r#"MockRegistry/query: cannot find foo ^1.0.0"#), | ||
Err(r#"cannot get dependencies of `root_1@1.0.0`"#), | ||
) | ||
} | ||
|
||
|
@@ -344,7 +342,7 @@ mod tests { | |
check( | ||
registry![("foo v2.0.0", []),], | ||
&[deps![("foo", "1.0.0")]], | ||
Err(r#"cannot find package foo"#), | ||
Err(r#"cannot get dependencies of `[email protected]`"#), | ||
) | ||
} | ||
|
||
|
@@ -353,7 +351,7 @@ mod tests { | |
check( | ||
registry![("foo v1.0.0", []),], | ||
&[deps![("foo", "1.0.0", "git+https://example.git/foo.git")]], | ||
Err(r#"MockRegistry/query: cannot find foo ^1.0.0 (git+https://example.git/foo.git)"#), | ||
Err(r#"cannot get dependencies of `root_1@1.0.0`"#), | ||
) | ||
} | ||
|
||
|
@@ -369,7 +367,7 @@ mod tests { | |
("b v3.8.14", []), | ||
], | ||
&[deps![("a", "~3.6"), ("b", "~3.6")]], | ||
Err(r#"cannot find package a"#), | ||
Err(r#"cannot get dependencies of `[email protected]`"#), | ||
) | ||
} | ||
|
||
|
@@ -389,7 +387,7 @@ mod tests { | |
("b v3.8.5", [("d", "2.9.0")]), | ||
], | ||
&[deps![("a", "~3.6"), ("c", "~1.1"), ("b", "~3.6")]], | ||
Err(r#"cannot find package a"#), | ||
Err(r#"cannot get dependencies of `[email protected]`"#), | ||
) | ||
} | ||
|
||
|
@@ -412,7 +410,7 @@ mod tests { | |
), | ||
], | ||
&[deps![("e", "~1.0"), ("a", "~3.7"), ("b", "~3.7")]], | ||
Err(r#"cannot find package e"#), | ||
Err(r#"cannot get dependencies of `[email protected]`"#), | ||
) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,7 +199,10 @@ fn runs_resolver_if_network_is_allowed() { | |
"#}) | ||
.failure() | ||
.stdout_matches(indoc! {r#" | ||
error: cannot find package dep | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
cannot find package `dep ^1.0.0` | ||
"#}) | ||
.run(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,10 +38,12 @@ fn https_something_happens() { | |
.failure() | ||
.stdout_matches(indoc! {r#" | ||
[..] Updating git repository https://127.0.0.1:[..]/foo/bar | ||
error: failed to clone into: [..] | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
process did not exit successfully: exit [..]: 128 | ||
0: failed to clone into: [..] | ||
1: failed to clone into: [..] | ||
2: process did not exit successfully: exit status: 128 | ||
"#}); | ||
}); | ||
} | ||
|
@@ -73,10 +75,12 @@ fn ssh_something_happens() { | |
.failure() | ||
.stdout_matches(indoc! {r#" | ||
[..] Updating git repository ssh://127.0.0.1:[..]/foo/bar | ||
error: failed to clone into: [..] | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
process did not exit successfully: exit [..]: 128 | ||
0: failed to clone into: [..] | ||
1: failed to clone into: [..] | ||
2: process did not exit successfully: exit status: 128 | ||
"#}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,10 +191,12 @@ fn not_found() { | |
.assert() | ||
.failure() | ||
.stdout_matches(indoc! {r#" | ||
error: failed to lookup for `baz ^1 (registry+http://[..])` in registry: registry+http://[..] | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
package not found in registry: baz ^1 (registry+http://[..]) | ||
0: failed to lookup for `baz ^1 (registry+http://[..])` in registry: registry+http://[..] | ||
1: failed to lookup for `baz ^1 (registry+http://[..])` in registry: registry+http://[..] | ||
2: package not found in registry: baz ^1 (registry+http://[..]) | ||
"#}); | ||
|
||
let expected = expect![[" | ||
|
@@ -245,11 +247,13 @@ fn missing_config_json() { | |
.assert() | ||
.failure() | ||
.stdout_matches(indoc! {r#" | ||
error: failed to lookup for `baz ^1 (registry+http://[..])` in registry: registry+http://[..] | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
0: failed to fetch registry config | ||
1: HTTP status client error (404 Not Found) for url (http://[..]/config.json) | ||
0: failed to lookup for `baz ^1 (registry+http://[..])` in registry: registry+http://[..] | ||
1: failed to lookup for `baz ^1 (registry+http://[..])` in registry: registry+http://[..] | ||
2: failed to fetch registry config | ||
3: HTTP status client error (404 Not Found) for url (http://[..]/config.json) | ||
"#}); | ||
|
||
let expected = expect![[" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,10 +63,12 @@ fn not_found() { | |
.assert() | ||
.failure() | ||
.stdout_matches(indoc! {r#" | ||
error: failed to lookup for `baz ^1 (registry+file://[..])` in registry: registry+file://[..] | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
package not found in registry: baz ^1 (registry+file://[..]) | ||
0: failed to lookup for `baz ^1 (registry+file://[..])` in registry: registry+file://[..] | ||
1: failed to lookup for `baz ^1 (registry+file://[..])` in registry: registry+file://[..] | ||
2: package not found in registry: baz ^1 (registry+file://[..]) | ||
"#}); | ||
} | ||
|
||
|
@@ -90,10 +92,12 @@ fn empty_registry() { | |
.assert() | ||
.failure() | ||
.stdout_matches(indoc! {r#" | ||
error: failed to lookup for `baz ^1 (registry+file://[..])` in registry: registry+file://[..] | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
package not found in registry: baz ^1 (registry+file://[..]) | ||
0: failed to lookup for `baz ^1 (registry+file://[..])` in registry: registry+file://[..] | ||
1: failed to lookup for `baz ^1 (registry+file://[..])` in registry: registry+file://[..] | ||
2: package not found in registry: baz ^1 (registry+file://[..]) | ||
"#}); | ||
} | ||
|
||
|
@@ -117,10 +121,12 @@ fn url_pointing_to_file() { | |
.assert() | ||
.failure() | ||
.stdout_matches(indoc! {r#" | ||
error: failed to load source: registry+file://[..] | ||
error: cannot get dependencies of `[email protected]` | ||
Caused by: | ||
local registry path is not a directory: [..] | ||
0: failed to load source: registry+file://[..] | ||
1: failed to load source: registry+file://[..] | ||
2: local registry path is not a directory: [..] | ||
"#}); | ||
|
||
// Prevent the temp directory from being deleted until this point. | ||
|