

Improve error message for empty dep by hi-rustin · Pull Request #12001 · rust-la...
source link: https://github.com/rust-lang/cargo/pull/12001
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation
Member
What does this PR try to resolve?
Improve error message for empty dep. Now we can specify a workspace dep in the table.
How should we test and review this PR?
See the unit tests.
Additional information
Should we make it an error? Because this warning exists for a long time.
Collaborator
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
added A-manifest Area: Cargo.toml issues S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
@@ -1589,7 +1591,9 @@ fn cannot_inherit_in_patch() { | ||
.with_stderr( |
||
"\ |
||
[WARNING] [CWD]/Cargo.toml: unused manifest key: patch.crates-io.bar.workspace |
||
[WARNING] [CWD]/Cargo.toml: dependency (bar) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions |
||
[WARNING] [CWD]/Cargo.toml: dependency (bar) specified without providing a local path, Git repository, version, \ |
Member
Author
This warning message is quite confusing.
It is not an empty dep:
[workspace.dependencies]
bar = { path = "bar" }
But the warning said it is.
Is there any existing issue, or could you submit one?
Member
Author
I will submit it later.
Thanks for the enhancement!
Should we make it an error? Because this warning exists for a long time.
It seems that someone tried that once. The team then reverted it back and suggested to try it with future-incompat system for the next time.
@@ -1589,7 +1591,9 @@ fn cannot_inherit_in_patch() { | ||
.with_stderr( |
||
"\ |
||
[WARNING] [CWD]/Cargo.toml: unused manifest key: patch.crates-io.bar.workspace |
||
[WARNING] [CWD]/Cargo.toml: dependency (bar) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions |
||
[WARNING] [CWD]/Cargo.toml: dependency (bar) specified without providing a local path, Git repository, version, \ |
Is there any existing issue, or could you submit one?
Member
@bors r+ |
added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Member
Author
Thanks for your review! |
Collaborator
|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No milestone
Successfully merging this pull request may close these issues.
None yet
Recommend
-
7
Conversation Copy link Contributor ...
-
10
New issue Lint for unused borrows as part of UNUSED_MUST_USE #86426
-
6
New issue Adjust error message with offline and frozen. #9644
-
4
New issue shrinking the deprecated span #86320
-
6
New issue Nicer error message if the user attempts to do let...else if #89974
-
6
New issue Improve error message for incorrect field accesses through raw pointers #91364
-
11
Copy link Contributor FabianWolff
-
11
Copy link Member Author fee1-dead
-
12
Improve error message for E0081 #97456 ...
-
3
Member ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK