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

Enhance error message for target auto-discovery #10090

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

weihanglo
Copy link
Member

resolves #9014
resolves #9117

Enhance for following scenarios:

  1. Target without path specified and cannot be found.
  2. Target without path specified and cannot be found, but a file
    exists at the commonly wrong path, e.g. example/a.rs, bench/b.rs.
  3. Found multiple candidate files and cannot infer which to use.

For the suggestion in the thread in #9116, I can't see any feasible way to list potential candidates without addditional I/O checking file existences. This PR is the best effort I can think of at this time. Feel free to comment. Thanks!

Enhance for following scenarios:

1. Target without `path` specified and cannot be found.
2. Target without `path` specified and cannot be found, but a file
   exists at the commonly wrong path, e.g. `example/a.rs`, `bench/b.rs`.
3. Found multiple candidate files and cannot infer which to use.
@weihanglo
Copy link
Member Author

Oops. highfive bot not working?

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

Seems reasonable to me, thanks!

@bors
Copy link
Collaborator

bors commented Nov 17, 2021

📌 Commit 2698bc6 has been approved by alexcrichton

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 17, 2021
@bors
Copy link
Collaborator

bors commented Nov 17, 2021

⌛ Testing commit 2698bc6 with merge aed9723...

@bors
Copy link
Collaborator

bors commented Nov 17, 2021

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing aed9723 to master...

@bors bors merged commit aed9723 into rust-lang:master Nov 17, 2021
@weihanglo weihanglo deleted the issue-9014 branch November 17, 2021 16:05
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 18, 2021
Update cargo

11 commits in 2e2a16e983f597da62bc132eb191bc3276d4b1bb..ad50d0d266213e0cc4f6e526a39d96faae9a3842
2021-11-08 15:13:38 +0000 to 2021-11-17 18:36:37 +0000
- Warn when alias shadows external subcommand (rust-lang/cargo#10082)
- Implement escaping to allow clean -p to delete all files when directory contains glob characters (rust-lang/cargo#10072)
- Match any error when failing to find executables (rust-lang/cargo#10092)
- Enhance error message for target auto-discovery (rust-lang/cargo#10090)
- Include note about bug while building on macOS in mdbook (rust-lang/cargo#10073)
- Improve the help text of the --quiet args for all commands (rust-lang/cargo#10080)
- `future-incompat-report` checks both stdout and stderr for color support (rust-lang/cargo#10024)
- Remove needless borrow to make clippy happy (rust-lang/cargo#10081)
- Describe the background color of the timing graph (rust-lang/cargo#10076)
- Make ProfileChecking comments a doc comments (rust-lang/cargo#10077)
- Fix test: hash value depends on endianness and bitness. (rust-lang/cargo#10011)
@ehuss ehuss added this to the 1.58.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