-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Try to improve "version not found" error #6112
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,9 +219,9 @@ fn wrong_version() { | |
.with_status(101) | ||
.with_stderr_contains( | ||
"\ | ||
error: no matching version `>= 1.0.0` found for package `foo` | ||
location searched: registry [..] | ||
versions found: 0.0.2, 0.0.1 | ||
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 ([..])` | ||
", | ||
).run(); | ||
|
@@ -233,9 +233,9 @@ required by package `foo v0.0.1 ([..])` | |
.with_status(101) | ||
.with_stderr_contains( | ||
"\ | ||
error: no matching version `>= 1.0.0` found for package `foo` | ||
location searched: registry [..] | ||
versions found: 0.0.4, 0.0.3, 0.0.2, ... | ||
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 ([..])` | ||
", | ||
).run(); | ||
|
@@ -520,10 +520,11 @@ fn relying_on_a_yank_is_bad() { | |
.with_status(101) | ||
.with_stderr_contains( | ||
"\ | ||
error: no matching version `= 0.0.2` found for package `baz` | ||
location searched: registry `[..]` | ||
versions found: 0.0.1 | ||
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 [..]` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did this change? I am not objecting, just mechanically, what changed making us print There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I just expanded the error message a bit here, only a subset of the output was previously tested with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah. 👍 |
||
", | ||
).run(); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,12 @@ use proptest::prelude::*; | |
|
||
proptest! { | ||
#![proptest_config(ProptestConfig { | ||
cases: | ||
if env::var("CI").is_ok() { | ||
256 // we have a lot of builds in CI so one or another of them will find problems | ||
} else { | ||
1024 // but locally try and find it in the one build | ||
}, | ||
// Note that this is a little low in terms of cases we'd like to test, | ||
// but this number affects how long this function takes. It can be | ||
// increased locally to execute more tests and try to find more bugs, | ||
// but for now it's semi-low to run in a small-ish amount of time on CI | ||
// and locally. | ||
cases: 256, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you choose to change this? I assume it was running to slowly locally. If that is correct can we atleast add back in a comment on how running repeatedly or increasing this number will increase the chance of finding a bug at the expense of time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yeah I found this was taking ~4m or so on my local machine which made a full test run sort of unbearable unfortunately :(. And sure I'll add a comment! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense. It is new and we are still experimenting with how it fits into the workflow. I am ok with running fewer iterations, for the better ergonomics of running the test. |
||
max_shrink_iters: | ||
if env::var("CI").is_ok() { | ||
// This attempts to make sure that CI will fail fast, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general the error messages are not nearly adequately tested. I'd like one day to be sure we have all the code branches tested. Thank you for adding this test!