-
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 empty dep #12001
Conversation
Signed-off-by: hi-rustin <[email protected]>
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
@@ -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, \ |
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.
This warning message is quite confusing.
It is not an empty dep:
[workspace.dependencies]
bar = { path = "bar" }
But the warning said it is.
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.
Is there any existing issue, or could you submit one?
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.
I will submit it later.
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.
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, \ |
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.
Is there any existing issue, or could you submit one?
@bors r+ |
Thanks for your review! 💚 💙 💜 💛 ❤️ |
☀️ Test successful - checks-actions |
Update cargo 17 commits in de80432f04da61d98dcbbc1572598071718ccfd2..9e586fbd8b931494067144623b76c37d213b1ab6 2023-04-21 13:18:32 +0000 to 2023-04-25 22:09:11 +0000 - Update home dependency (rust-lang/cargo#12037) - Warn instead of error in `cargo package` on empty `readme` or `license-file` in manifest (rust-lang/cargo#12036) - Clarify documentation around test target setting. (rust-lang/cargo#12032) - fix: apply `[env]` to target info discovery rustc (rust-lang/cargo#12029) - CI: ensure intra links for all members are checked (rust-lang/cargo#12025) - chore: make credential dependencies platform-specific (rust-lang/cargo#12027) - CI: use `-p` to specify workspace members instead of `--manifest-path` (rust-lang/cargo#12024) - ci: requires `test_gitoxide` and `lockfile` for both bors success and failure (rust-lang/cargo#12026) - Update windows-sys (rust-lang/cargo#12021) - Bump libc to 0.2.142 (rust-lang/cargo#12014) - Update openssl-src to 111.25.3+1.1.1t (rust-lang/cargo#12005) - Improve error message for empty dep (rust-lang/cargo#12001) - Remove wrong url in benchsuite manifest. (rust-lang/cargo#12020) - Bump versions of local crates (rust-lang/cargo#12019) - Add the Win32_System_Console feature since it is used (rust-lang/cargo#12016) - Update outdated crates.io URLs in publishing guide (rust-lang/cargo#12018) - Allow named debuginfo options in Cargo.toml (rust-lang/cargo#11958) r? `@ghost`
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.