1

Improve error message for empty dep by hi-rustin · Pull Request #12001 · rust-la...

 1 year ago
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.
neoserver,ios ssh client

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)

rustbot

added A-manifest Area: Cargo.toml issues S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Apr 20, 2023

@@ -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.

weihanglo reacted with confused emoji

Is there any existing issue, or could you submit one?

Member

Author

I will submit it later.

weihanglo reacted with heart emoji

Member

@weihanglo weihanglo

left a comment

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.

#9885 (comment)

hi-rustin reacted with thumbs up emoji
@@ -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+

Collaborator

pushpin Commit af0cd9f has been approved by weihanglo

It is now in the queue for this repository.

bors

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

Apr 24, 2023

Collaborator

hourglass Testing commit af0cd9f with merge b5177c6...

Member

Author

Thanks for your review! green_heartblue_heartpurple_heartyellow_heartheart

Collaborator

sunny Test successful - checks-actions
Approved by: weihanglo
Pushing b5177c6 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

weihanglo

weihanglo approved these changes
Assignees

ehuss

Labels
A-manifest Area: Cargo.toml issues S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

None yet

5 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK