feat: emit help messages for github pull request url in dependency#16207
feat: emit help messages for github pull request url in dependency#16207epage merged 2 commits intorust-lang:masterfrom
Conversation
3a91b48 to
87f00a3
Compare
|
As a heads up, we have some helpful suggestions for PRs at our contrib guide, including
|
|
Ah, the title says this is for an error but the code looks to be related to a warning |
69d5d4f to
d771595
Compare
### What does this PR try to resolve? Explicitly call out that we use rustc's diagnostic style guide, e.g. #16207 (comment) ### How to test and review this PR?
55fb6f2 to
f2836a7
Compare
|
Just have pushed changes reflecting kind reviews. The commit history is kind of a mess, so I'll clean it out once the change is confirmed appropriate. I'd also like to work on this but I think that should be another PR. |
|
r? @weihanglo rustbot has assigned @weihanglo. Use |
f2836a7 to
8e8755c
Compare
| " `git = \"{}\" rev = \"{}\"` \n", | ||
| " to specify pull requests as dependencies' revision." | ||
| ), | ||
| url, repo_url, rev |
There was a problem hiding this comment.
nit: prefer inline arg like git = "{repo_url}"
There was a problem hiding this comment.
Agreed, but format! does not capture variables when the format string is expanded from a macro (in this case, concat!). I'd prefer readability of concat! over iteration of push_string(format!(...)) s.
250f935 to
2bf6886
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
2bf6886 to
a9b8e6d
Compare
|
Cleared out commits, rebased on latest master. Also edited PR comment to reflect current implementation. |
a9b8e6d to
7cfe468
Compare
|
Wasn't aware of these, thanks! |
7cfe468 to
ca2973a
Compare
Update cargo 10 commits in 445fe4a68f469bf936b2fd81de2c503b233a7f4f..2d4fa139552ebdd5f091a1401ed03f7dc62cb43f 2025-11-07 18:08:19 +0000 to 2025-11-12 15:56:06 +0000 - feat: Add unstable rustc-unicode flag (rust-lang/cargo#16243) - fix(package): all tar entries timestamp be the same (rust-lang/cargo#16242) - feat: emit help messages for github pull request url in dependency (rust-lang/cargo#16207) - docs: fix comments for alternative registry fns (rust-lang/cargo#16235) - add into_value utility function for inheritableField (rust-lang/cargo#16234) - fix(command-vendor): strip_prefix panic in cp_sources method (rust-lang/cargo#16214) - fix(lock): Be moore direct in the error message (rust-lang/cargo#16233) - fix(lock): In error, differentiate between creating and updating lockfile (rust-lang/cargo#16227) - fix(cli): Refer to commands, not subcommands (rust-lang/cargo#16226) - fix(run): Help teach about argument escaping (rust-lang/cargo#16225)
Succeeding #15003.
Piror to this, using a GitHub pull request URLs as dependencies would just fail because of HTTP errors as it's simply not a git repository. This PR implements some help messages on such cases for users to know why it's failing, and how to fix it.
Close #15001.