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

Document private items for Cargo and publish under contributor guide #11019

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

weihanglo
Copy link
Member

@weihanglo weihanglo commented Aug 24, 2022

What does this PR try to resolve?

Document private items for Cargo and publish under contributor guide.

Cargo has many high quality doc comments hidden in its private universe. Making them public benefits both external tools developers and Cargo developers. Having a public doc also means they are under public scrutiny. We could expect more fixes against private docs. It is also more friendly to read for some people, at least I found myself often run cargo doc --document-private-items --no-deps if my eyes are tired of black-white terminals.

Anyway, a more discoverable documentation for Cargo internals is not a bad thing.

The site would eventually sit on https://doc.crates.io/contrib/apidoc/cargo.

How should we test and review this PR?

cargo doc --document-private-items --no-deps --open

A demo site also temporarily lives on https://weihanglo.tw/cargo/contrib/apidoc/cargo/

Additional information

Most of the docs are written by ehuss and alexcrichton. Highly appreciate their works. Kudos to them!

For any possible plan on merging Cargo Architecture doc into rustdoc, I don't think it would block this PR or vice versa.

@rust-highfive
Copy link

r? @epage

(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 Aug 24, 2022
@weihanglo
Copy link
Member Author

FYI, private items got a lock emoji (🔒), so existing readers should know an item is public or private with little efforts.

image

Cargo.toml Outdated Show resolved Hide resolved
@weihanglo weihanglo force-pushed the doc-private-items-cargo-itself branch from 93b0977 to 1c82d9c Compare August 25, 2022 11:26
@weihanglo weihanglo changed the title Documenting private items for Cargo on docs.rs Document private items for Cargo and publish under contributor guide Aug 25, 2022
@epage
Copy link
Contributor

epage commented Aug 31, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Aug 31, 2022

📌 Commit 1c82d9c 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 Aug 31, 2022
@bors
Copy link
Contributor

bors commented Aug 31, 2022

⌛ Testing commit 1c82d9c with merge f126ea4...

@bors
Copy link
Contributor

bors commented Aug 31, 2022

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

@bors bors merged commit f126ea4 into rust-lang:master Aug 31, 2022
@weihanglo weihanglo deleted the doc-private-items-cargo-itself branch August 31, 2022 22:52
weihanglo added a commit to rust-lang/rust that referenced this pull request Sep 5, 2022
8 commits in 4ed54cecce3ce9ab6ff058781f4c8a500ee6b8b5..646e9a0b9ea8354cc409d05f10e8dc752c5de78e
2022-08-27 18:41:39 +0000 to 2022-09-02 14:29:28 +0000
- Support inheriting jobserver fd for external subcommands (rust-lang/cargo#10511)
- refactor(cli): Lazy load config (rust-lang/cargo#11029)
- chore: Don't show genned docs in ripgrep (rust-lang/cargo#11040)
- Document private items for Cargo and publish under contributor guide (rust-lang/cargo#11019)
- Add names to CI jobs (rust-lang/cargo#11039)
- Rework test error handling (rust-lang/cargo#11028)
- Very slight `cargo add` documentation improvements (rust-lang/cargo#11033)
- Update compiling requirements. (rust-lang/cargo#11030)
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2022
Update cargo

8 commits in 4ed54cecce3ce9ab6ff058781f4c8a500ee6b8b5..646e9a0b9ea8354cc409d05f10e8dc752c5de78e
2022-08-27 18:41:39 +0000 to 2022-09-02 14:29:28 +0000
- Support inheriting jobserver fd for external subcommands (rust-lang/cargo#10511)
- refactor(cli): Lazy load config (rust-lang/cargo#11029)
- chore: Don't show genned docs in ripgrep (rust-lang/cargo#11040)
- Document private items for Cargo and publish under contributor guide (rust-lang/cargo#11019)
- Add names to CI jobs (rust-lang/cargo#11039)
- Rework test error handling (rust-lang/cargo#11028)
- Very slight `cargo add` documentation improvements (rust-lang/cargo#11033)
- Update compiling requirements. (rust-lang/cargo#11030)
bors added a commit that referenced this pull request Sep 9, 2022
chore(ci): Ensure intradoc links are valid

The plan is to move the architecture documents over to rustdoc so they can more easily stay up-to-date.  To do so, we'll need to enforce that the intradoc links stay valid.

As part of this, the PR run for `cargo doc` was updated to the command in #11019
@ehuss ehuss added this to the 1.65.0 milestone Sep 21, 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.

5 participants