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

Detect incorrectly named cargo.toml #9607

Merged
merged 4 commits into from
Jun 22, 2021

Conversation

Rustin170506
Copy link
Member

close #9541

@rust-highfive
Copy link

r? @alexcrichton

(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 Jun 21, 2021
@Rustin170506 Rustin170506 marked this pull request as ready for review June 21, 2021 07:32
@Rustin170506 Rustin170506 changed the title Detect incorrectly named cargo.toml [WIP] Detect incorrectly named cargo.toml Jun 21, 2021
@Rustin170506
Copy link
Member Author

r? @ehuss

I tried to implement it, but I'm not sure I'm on the right track. When should it be detected and prompted? I'm targeting install now, but that doesn't seem right?

@rust-highfive rust-highfive assigned ehuss and unassigned alexcrichton Jun 21, 2021
@ehuss
Copy link
Contributor

ehuss commented Jun 21, 2021

Hm, yea I guess I see that it is tricky to find the right spot since there are multiple places for searching. I might not worry too much about advanced scenarios like installing from a git repository. I think if a user has gotten that far, they've already got it worked out. I believe read_packages is only used for a few scenarios where cargo hunts for the right package. For cargo install, if there isn't a correctly named Cargo.toml given to --path, it won't get that far.

I think the spirit of the issue is a beginner starting a new project. I would just check for the basic use cases:

  • cargo build will search for the nearest Cargo.toml. That search is done in find_root_manifest_for_wd. There would probably need to be a check there.
  • I guess another check for cargo install --path wouldn't hurt, since some people might start there. I think that check would go here.

@Rustin170506 Rustin170506 changed the title [WIP] Detect incorrectly named cargo.toml Detect incorrectly named cargo.toml Jun 22, 2021
@Rustin170506
Copy link
Member Author

@ehuss I think it's ready to review. Thank you for your patient guidance!

@ehuss
Copy link
Contributor

ehuss commented Jun 22, 2021

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 22, 2021

📌 Commit b3a1d0c 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 Jun 22, 2021
@bors
Copy link
Contributor

bors commented Jun 22, 2021

⌛ Testing commit b3a1d0c with merge 9233aa0...

@bors
Copy link
Contributor

bors commented Jun 22, 2021

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 9233aa0 to master...

@bors bors merged commit 9233aa0 into rust-lang:master Jun 22, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jun 24, 2021
Update cargo

This also updates `opener` used in bootstrap (to try to keep dependencies unified).

18 commits in 44456677b5d1d82fe981c955dc5c67734b31f340..9233aa06c801801cff75df65df718d70905a235e
2021-06-12 18:00:01 +0000 to 2021-06-22 21:32:55 +0000
- Detect incorrectly named cargo.toml (rust-lang/cargo#9607)
- Unify weak and namespaced features. (rust-lang/cargo#9574)
- Change `rustc-cdylib-link-arg` error to a warning. (rust-lang/cargo#9563)
- Updates to future-incompatible reporting. (rust-lang/cargo#9606)
- Add a compatibility notice for diesel and the new resolver. (rust-lang/cargo#9602)
- Don't allow config env to modify vars set by cargo (rust-lang/cargo#9579)
- Disambiguate is_symlink. (rust-lang/cargo#9604)
- Update opener requirement from 0.4 to 0.5 (rust-lang/cargo#9583)
- Avoid quadratic complexity when splitting output into lines (rust-lang/cargo#9586)
- Bump to 0.56.0, update changelog (rust-lang/cargo#9597)
- Fix dep-info files including non-local build script paths. (rust-lang/cargo#9596)
- Relax doc collision error. (rust-lang/cargo#9595)
- Handle "jobs = 0" case in cargo config files (rust-lang/cargo#9584)
- Enhancements to testsuite error output. (rust-lang/cargo#9589)
- Fix typo (rust-lang/cargo#9590)
- Enable support for fix --edition for 2021. (rust-lang/cargo#9588)
- Add more details for installing git repository errors (rust-lang/cargo#9582)
- More information for links conflicting (rust-lang/cargo#9568)
@ehuss ehuss added this to the 1.55.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
Development

Successfully merging this pull request may close these issues.

Detect incorrectly named cargo.toml
5 participants