Skip to content

Report cmd aliasing failure with more contexts - #11087

Merged
bors merged 4 commits into
rust-lang:masterfrom
weihanglo:issue-11013
Sep 22, 2022
Merged

bors merged 4 commits into
rust-lang:masterfrom
weihanglo:issue-11013

Conversation

@weihanglo

@weihanglo weihanglo commented Sep 14, 2022 •

Copy link
Copy Markdown
Member

What does this PR try to resolve?

Commands aliasing resolution should report TOML parsing error to users.

Fixes #11013.

How should we test and review this PR?

ef7a4ef is the most important commit in this PR. has_key now throws errors after this PR, so any use Config::get<Option<…>>() is affected if there is a malformed config. Had a skim over all usages of get::<Option<…>>, get_string and get_path, I don't feel any of them should ignore errors.

@rust-highfive

Copy link
Copy Markdown

r? @ehuss

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 14, 2022
@weihanglo
weihanglo marked this pull request as draft September 14, 2022 14:39
@weihanglo
weihanglo marked this pull request as ready for review September 14, 2022 19:43
Comment thread src/bin/cargo/main.rs Resolved
Comment thread src/bin/cargo/main.rs Resolved
Comment thread src/bin/cargo/cli.rs Resolved
Comment thread src/bin/cargo/cli.rs Resolved
Comment thread src/bin/cargo/cli.rs Resolved
Comment thread src/bin/cargo/cli.rs Resolved
Comment thread src/bin/cargo/cli.rs Resolved
Comment thread src/bin/cargo/main.rs Resolved
@weihanglo

Copy link
Copy Markdown
Member Author

Just removed unnecessary ConfigErrorKind and hack on cargo version.

Now this PR looks nicer and smaller. Thank you @epage.

@bors

bors commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11118) made this pull request unmergeable. Please resolve the merge conflicts.

@epage

epage commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

bors r+

@weihanglo

Copy link
Copy Markdown
Member Author

bors r+

Typo? 🤣

@epage

epage commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

📌 Commit 5caabc0 has been approved by epage

It is now in the queue for this repository.

@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 Sep 22, 2022
@bors

bors commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5caabc0 with merge 247ca7f...

@bors

bors commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: epage
Pushing 247ca7f to master...

@bors
bors merged commit 247ca7f into rust-lang:master Sep 22, 2022
@weihanglo
weihanglo deleted the issue-11013 branch September 22, 2022 15:41
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2022
22 commits in 73ba3f35e0205844418260722c11602113179c4a..f5fed93ba24607980647962c59863bbabb03ce14
2022-09-18 06:38:16 +0000 to 2022-09-27 12:03:57 +0000

- build-scripts.md: Use em dash consistently. (rust-lang/cargo#11150)
- Indicate how Cargo locates the manifest (rust-lang/cargo#10770)
- Reduce references to `[project]` within cargo (rust-lang/cargo#11135)
- Iteratively construct target cfg (rust-lang/cargo#11114)
- update comment about `CARGO_BIN_EXE_` (rust-lang/cargo#11146)
- Call out that not all config values can be set via env vars (rust-lang/cargo#11139)
- Bump to 0.67.0, update changelog (rust-lang/cargo#11137)
- ci: update toolchain for building api doc (rust-lang/cargo#11134)
- Http publish not noop (rust-lang/cargo#11111)
- Improve errors for TOML fields that support workspace inheritance (rust-lang/cargo#11113)
- switch to `std::task::ready!()` where possible (rust-lang/cargo#11130)
- Report cmd aliasing failure with more contexts (rust-lang/cargo#11087)
- minor: remove unused mut (rust-lang/cargo#11127)
- fix(cli): Forward non-UTF8 arguments to external subcommands (rust-lang/cargo#11118)
- This change adds an example to the authors attribute in the manifest. (rust-lang/cargo#10938)
- Add support for relative git submodule paths (rust-lang/cargo#11106)
- make unknown features on `cargo add` more discoverable (rust-lang/cargo#11098)
- Unlink old final artifacts before compilation (rust-lang/cargo#11122)
- refactor(cli): Prepare for clap v4 (rust-lang/cargo#11116)
- fix(cli): Error trailing args rather than ignore (rust-lang/cargo#11119)
- Add a minor clarification (rust-lang/cargo#11093)
- doc(changelog): mention CVE fixes (rust-lang/cargo#11104)
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2022
Update cargo

22 commits in 73ba3f35e0205844418260722c11602113179c4a..f5fed93ba24607980647962c59863bbabb03ce14 2022-09-18 06:38:16 +0000 to 2022-09-27 12:03:57 +0000

- build-scripts.md: Use em dash consistently. (rust-lang/cargo#11150)
- Indicate how Cargo locates the manifest (rust-lang/cargo#10770)
- Reduce references to `[project]` within cargo (rust-lang/cargo#11135)
- Iteratively construct target cfg (rust-lang/cargo#11114)
- update comment about `CARGO_BIN_EXE_` (rust-lang/cargo#11146)
- Call out that not all config values can be set via env vars (rust-lang/cargo#11139)
- Bump to 0.67.0, update changelog (rust-lang/cargo#11137)
- ci: update toolchain for building api doc (rust-lang/cargo#11134)
- Http publish not noop (rust-lang/cargo#11111)
- Improve errors for TOML fields that support workspace inheritance (rust-lang/cargo#11113)
- switch to `std::task::ready!()` where possible (rust-lang/cargo#11130)
- Report cmd aliasing failure with more contexts (rust-lang/cargo#11087)
- minor: remove unused mut (rust-lang/cargo#11127)
- fix(cli): Forward non-UTF8 arguments to external subcommands (rust-lang/cargo#11118)
- This change adds an example to the authors attribute in the manifest. (rust-lang/cargo#10938)
- Add support for relative git submodule paths (rust-lang/cargo#11106)
- make unknown features on `cargo add` more discoverable (rust-lang/cargo#11098)
- Unlink old final artifacts before compilation (rust-lang/cargo#11122)
- refactor(cli): Prepare for clap v4 (rust-lang/cargo#11116)
- fix(cli): Error trailing args rather than ignore (rust-lang/cargo#11119)
- Add a minor clarification (rust-lang/cargo#11093)
- doc(changelog): mention CVE fixes (rust-lang/cargo#11104)
@ehuss ehuss added this to the 1.66.0 milestone Oct 1, 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

Development

Successfully merging this pull request may close these issues.

config errors with alias may not be reported

5 participants