-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
improve error message for unmatched prerelease dependencies #7191
Merged
Conversation
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
@debris thanks for the PR! |
Seems reasonable to me! Any and all improvements to error messages always sounds good to me :) |
The nightly errors on CI should now be fixed. |
@bors: r=Eh2406 |
📌 Commit 577968e has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Aug 1, 2019
bors
added a commit
that referenced
this pull request
Aug 1, 2019
improve error message for unmatched prerelease dependencies fixes #7007 error message before: ``` error: no matching package named `a` found location searched: [..] perhaps you meant: a required by package `b v0.1.0 ([..])` ``` error message now ``` error: no matching package named `a` found location searched: [..] prerelease package needs to be specified explicitly a = { version = "0.1.1-alpha.0" } required by package `b v0.1.0 ([..])` ```
☀️ Test successful - checks-azure |
Closed
bors
added a commit
to rust-lang/rust
that referenced
this pull request
Aug 8, 2019
Update cargo 9 commits in 26092da337b948719549cd5ed3d1051fd847afd7..42a8c0adf91323c01228268c651aef5366b25b69 2019-07-31 23:24:32 +0000 to 2019-08-07 20:41:07 +0000 - Add support for customizing JSON diagnostics from Cargo (rust-lang/cargo#7214) - Bump rustfix (rust-lang/cargo#7221) - Fix remap-path-prefix from failing. (rust-lang/cargo#7219) - Clean up build script stuff and documentation. (rust-lang/cargo#7215) - Remove debug panic in package-features. (rust-lang/cargo#7213) - Fix an old test. (rust-lang/cargo#7208) - Remove unused AstBuilder (rust-lang/cargo#7210) - Revert "Release a jobserver token while locking a file" (rust-lang/cargo#7201) - improve error message for unmatched prerelease dependencies (rust-lang/cargo#7191)
bors
added a commit
that referenced
this pull request
Sep 14, 2023
Prerelease candidates error message ### What does this PR try to resolve? Error messages reporting on versions that do not match the request incorrectly ignore pre-release versions. This is because the version requirement `"*"` cannot match prerelease versions. #12315 ### How should we test and review this PR? Sorry for the large amount of white space changes, fmt got to fmt. 🤷♂️ The process was: - Revise commit from #12316 (thanks to `@loloicci)` that change the requirement from `"*"` to `Any` - Move the handling of our special "did you mean to specify a pre-release" code and update tests - some small re-factoring ### Additional information The old "did you mean to specify a pre-release" #7191 check only occurred when version requirement does not match any versions and you depended on a package that did not have any non-prerelease versions. Making it rarely useful. The new one will appear any time your version requirement does not match any versions and the package does have pre-release versions. Which may be too common. I'm open to suggestions for better heuristic. It's also not clear that the new message make sense in the case of patched versions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #7007
error message before:
error message now