Skip to content

Conversation

linyihai
Copy link
Contributor

@linyihai linyihai commented Jan 9, 2024

What does this PR try to resolve?

follow up #13046
add public/private explanation for cargo-add in man page.

How should we test and review this PR?

Additional information

The help info would be like this

  • cargo help add
        --public
           Mark the dependency as public.

           The dependency can be referenced in your library’s public API.

           Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>

       --no-public
           Mark the dependency as private.

           While you can use the crate in your implementation, it cannot be referenced in your public API.

           Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>
  • cargo add -h
      --public               Mark the dependency as public (unstable)
      --no-public            Mark the dependency as private (unstable)
  • cargo add --help
      --public
          Mark the dependency as public (unstable)
          
          The dependency can be referenced in your library's public API.

      --no-public
          Mark the dependency as private (unstable)
          
          While you can use the crate in your implementation, it cannot be referenced in your public API.

@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2024

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2024
@epage
Copy link
Contributor

epage commented Jan 9, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 9, 2024

📌 Commit d973c25 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 Jan 9, 2024
@bors
Copy link
Contributor

bors commented Jan 9, 2024

⌛ Testing commit d973c25 with merge 8766536...

bors added a commit that referenced this pull request Jan 9, 2024
doc: add `public` info in `cargo-add` man page.

### What does this PR try to resolve?
follow up #13046
add `public/private` explanation for `cargo-add` in man page.

### How should we test and review this PR?

### Additional information
@epage
Copy link
Contributor

epage commented Jan 9, 2024

@bors r-

@bors bors added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 9, 2024
@bors
Copy link
Contributor

bors commented Jan 9, 2024

☀️ Try build successful - checks-actions
Build commit: 8766536 (87665366b35686b68f0662df4865751ede0c0bb6)

@linyihai linyihai force-pushed the cargo-add-public-manpage branch from d973c25 to ee34a27 Compare January 10, 2024 12:25
@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. Command-add labels Jan 10, 2024
@linyihai
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. labels Jan 10, 2024
@linyihai linyihai marked this pull request as draft January 10, 2024 13:46
@linyihai linyihai force-pushed the cargo-add-public-manpage branch from ee34a27 to f9c9185 Compare January 10, 2024 14:03
@linyihai linyihai force-pushed the cargo-add-public-manpage branch from f9c9185 to 3ad55cb Compare January 10, 2024 14:59
@linyihai linyihai marked this pull request as ready for review January 10, 2024 15:44
@linyihai linyihai force-pushed the cargo-add-public-manpage branch from 3ad55cb to 0ac0a18 Compare January 10, 2024 16:06
@linyihai linyihai force-pushed the cargo-add-public-manpage branch from 0ac0a18 to 61f6e07 Compare January 11, 2024 15:26
@linyihai linyihai force-pushed the cargo-add-public-manpage branch from 61f6e07 to f141c10 Compare January 11, 2024 15:41
@rustbot rustbot assigned epage and unassigned ehuss Jan 11, 2024
@epage
Copy link
Contributor

epage commented Jan 11, 2024

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jan 11, 2024

📌 Commit f141c10 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 Jan 11, 2024
@bors
Copy link
Contributor

bors commented Jan 11, 2024

⌛ Testing commit f141c10 with merge e063c0e...

bors added a commit that referenced this pull request Jan 11, 2024
doc: add `public` info in `cargo-add` man page.

### What does this PR try to resolve?
follow up #13046
add `public/private` explanation for `cargo-add` in man page.

### How should we test and review this PR?

### Additional information

The help info would be like this

- `cargo help add`
```
        --public
           Mark the dependency as public.

           The dependency can be referenced in your library’s public API.

           Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>

       --no-public
           Mark the dependency as private.

           While you can use the crate in your implementation, it cannot be referenced in your public API.

           Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>
```
- `cargo add -h`
```
      --public               Mark the dependency as public (unstable)
      --no-public            Mark the dependency as private (unstable)
```

- `cargo add --help`
```
      --public
          Mark the dependency as public (unstable)

          The dependency can be referenced in your library's public API.

      --no-public
          Mark the dependency as private (unstable)

          While you can use the crate in your implementation, it cannot be referenced in your public API.
```
@bors
Copy link
Contributor

bors commented Jan 11, 2024

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 11, 2024
@weihanglo
Copy link
Member

@bors retry

@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 Jan 11, 2024
@bors
Copy link
Contributor

bors commented Jan 11, 2024

⌛ Testing commit f141c10 with merge 2697837...

@bors
Copy link
Contributor

bors commented Jan 11, 2024

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

@bors bors merged commit 2697837 into rust-lang:master Jan 11, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2024
Update cargo

8 commits in 3e428a38a34e820a461d2cc082e726d3bda71bcb..84976cd699f4aea56cb3a90ce3eedeed9e20d5a5
2024-01-09 20:46:36 +0000 to 2024-01-12 15:55:43 +0000
- fix(resolver): do not panic when sorting empty summaries (rust-lang/cargo#13287)
- Implementation of shallow libgit2 fetches behind an unstable flag (rust-lang/cargo#13252)
- Add documentation entry for unstable `--output-format` flag (rust-lang/cargo#13284)
- doc: add `public` info in `cargo-add` man page. (rust-lang/cargo#13272)
- More docs on prerelease compat (rust-lang/cargo#13286)
- Add unstable `--output-format` option to  `cargo rustdoc` (rust-lang/cargo#12252)
- feat: Add `rustc` style errors for manifest parsing (rust-lang/cargo#13172)
- Document why `du` function uses mutex (rust-lang/cargo#13273)

r? ghost
@rustbot rustbot added this to the 1.77.0 milestone Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation Command-add 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.

6 participants