-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Indicate how Cargo locates the manifest #10770
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, thanks for your contribution. It's glad to see hard works on doc improvement!
Your observation is correct. Cargo does search Cargo.toml
in current working dir and upward if not exist. But speaking to workspaces it becomes a bit complicated. Cargo searches for root workspace manifest by either traversing parent dirs or look up the field package.workspace
.
I might also be confused seeing a sentence about how Cargo locates Cargo.toml
there, as the paragraph is mainly talking about the format of Cargo.toml
but not any individual command. I would try to expand the description of cargo locate-project
with the search logic, and refer to it in anywhere needed.
Would it be alright to reference It is just that I fear that such knowledge should become tribal knowledge, and just having the information in |
Just a general question. Whose job is it to resolve merge conflicts when pull requests diverge from the main branch? Is it the contributor or the maintainer? Does that generally depend on the particular open-source project? |
I would expect something like this, and then we can expand the detail on
I would say it's PR authors' responsibilities unless the conflict is too complicated. If in that case, maintainers and contributors collaborate to resolve it. And I feel like only when it is really a conflict should you update your branch to master. |
Ping @wmstack. Just checking in to see if you are still interested in working on this, or if you had any questions. |
Hi. Looks like you're still working on this PR. The PR looks good, but it is not much helpful inkt linking to r? @weihanglo |
Hmm, I was under the impression that I had to run a shell script to fix failing unit tests. However, when I did that, it seems that I lost the documentation that I put there at 755bdc1 |
Sorry for not saying in clear. To generate docs for commands, you need to follow this guide. That is, edit We're almost there! Only a few things to do before merging:
Thank you! |
Every time I run the shell script, the content that I have written in Edit: I see the man pages form the commands section of the cargo book, which are auto-generated. That means I needed to edit the man pages. The manifest, not being part of the man pages, was not deleted since it was not auto-generated. I was wondering why the markdown looked a bit generated... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time I run the shell script, the content that I have written in
cargo-locate-project
dissappears...
You need to edit src/doc/man/cargo-locate-project.md
instead and generate others.
Okay I fixed the typos and squashed all the commits into 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @wmstack. It's my fault but can you do me one more favor for this?
#10770 (comment)
Okay, I removed the last comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!!
Oh no. We need to run |
Man, I had to touch up on skills I hadn't used in ages! Like reflog and rebase and such. Thanks as well! |
@bors r+ |
☀️ Test successful - checks-actions |
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)
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)
Currently the only place where that is documented is in an obscure flag called
--manifest-path
. The behaviour of Cargo in regards to locating the manifest should be in a more obvious place, and this seems to be right about where I added it.