Skip to content
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

Warning when using features in replace #9681

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

Rustin170506
Copy link
Member

@Rustin170506 Rustin170506 commented Jul 12, 2021

close #3034
close #2582

r? @ehuss

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 12, 2021
@Rustin170506
Copy link
Member Author

It seems difficult to trigger a warning here, so I simply rejected it.

It might be a better solution if we could add the warning elsewhere. Because rejecting it directly may affect users in a big way.

Also, we need a test for default-features and I will add it after we decide whether to warn or reject.

@ehuss
Copy link
Contributor

ehuss commented Jul 22, 2021

Hm, instead of putting these checks deep in the query system, can both patch and replace checks be moved to toml/mod.rs when they are parsed? There should be some place to conveniently place a check there where the code can be shared for both of them.

@ehuss
Copy link
Contributor

ehuss commented Jul 22, 2021

Hm, nevermind, I forgot about patch-in-config.

Perhaps moving the check to somewhere like resolve_ws_with_opts? There's already a warning there about unused replace entries. I think a warning about unused features might also work there.

@Rustin170506
Copy link
Member Author

@ehuss Thanks for your help!

Addressed.

@Rustin170506 Rustin170506 changed the title Reject when using features in replace Warning when using features in replace Jul 23, 2021
@ehuss
Copy link
Contributor

ehuss commented Jul 23, 2021

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 23, 2021

📌 Commit 771356d has been approved by ehuss

@bors 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 Jul 23, 2021
@bors
Copy link
Contributor

bors commented Jul 23, 2021

⌛ Testing commit 771356d with merge 9535dc3...

@bors
Copy link
Contributor

bors commented Jul 23, 2021

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 9535dc3 to master...

@bors bors merged commit 9535dc3 into rust-lang:master Jul 23, 2021
@Rustin170506 Rustin170506 deleted the rustin-patch-reject branch July 24, 2021 01:47
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 27, 2021
Update cargo

8 commits in cebef2951ee69617852844894164b54ed478a7da..d21c22870e58499d6c31f1bef3bf1255eb021666
2021-07-22 13:01:52 +0000 to 2021-07-26 20:23:21 +0000
- Fix version string. (rust-lang/cargo#9727)
- Allow publishing from workspace root. (rust-lang/cargo#9559)
- Better msg for wrong position (rust-lang/cargo#9723)
- Stabilize the rustc-link-arg option (rust-lang/cargo#9557)
- Warning when using features in replace (rust-lang/cargo#9681)
- Refactor if let chains to matches! macro (rust-lang/cargo#9721)
- Weather is not nice today.. (rust-lang/cargo#9720)
- Update should_use_metadata function (rust-lang/cargo#9653)
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 27, 2021
Update cargo

8 commits in cebef2951ee69617852844894164b54ed478a7da..d21c22870e58499d6c31f1bef3bf1255eb021666
2021-07-22 13:01:52 +0000 to 2021-07-26 20:23:21 +0000
- Fix version string. (rust-lang/cargo#9727)
- Allow publishing from workspace root. (rust-lang/cargo#9559)
- Better msg for wrong position (rust-lang/cargo#9723)
- Stabilize the rustc-link-arg option (rust-lang/cargo#9557)
- Warning when using features in replace (rust-lang/cargo#9681)
- Refactor if let chains to matches! macro (rust-lang/cargo#9721)
- Weather is not nice today.. (rust-lang/cargo#9720)
- Update should_use_metadata function (rust-lang/cargo#9653)
@ehuss ehuss added this to the 1.56.0 milestone Feb 6, 2022
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.
Projects
None yet
4 participants