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

doc: Improve example of using the links field #10728

Merged
merged 2 commits into from
Jun 10, 2022
Merged

Conversation

jorendorff
Copy link
Contributor

"foo" doesn't really help say what this is.

clearer example
@rust-highfive
Copy link

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 3, 2022
@@ -364,7 +364,8 @@ script guide.
```toml
[package]
# ...
links = "foo"
# this package links with a native library called "git2", e.g. "libgit2.a" on Linux
links = "git2"
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think I'd prefer to instead say

    For example, to link against the native library `git2` (e.g. `libgit2.a` on Linux):

    ```toml
    ```
  • It makes the example more directly related to what an end-user will do
  • It doesn't unintentionally reinforce to users to repeat what they are commenting about in comments

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting the note outside of the TOML sounds good (also for consistency with the rest of the examples).

I would caution on the exact wording, as saying "to link against…" might be misleading since adding links doesn't actually cause a library to be linked. I would lean more towards the proposed text ("this package links with a…"), or maybe a slight modification like "links indicates that the package links with a …".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I have revised this a bit. It now says

    For example, a crate that links a native library called "git2" (e.g. `libgit2.a`
    on Linux) may specify:
    
    ```toml
    links = "git2"
    ```

Remove comment from example toml to prose.
@ehuss
Copy link
Contributor

ehuss commented Jun 10, 2022

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 10, 2022

📌 Commit c586652 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 10, 2022
@bors
Copy link
Contributor

bors commented Jun 10, 2022

⌛ Testing commit c586652 with merge 1b3fce7...

@bors
Copy link
Contributor

bors commented Jun 10, 2022

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 1b3fce7 to master...

@bors bors merged commit 1b3fce7 into rust-lang:master Jun 10, 2022
arlosi added a commit to arlosi/rust that referenced this pull request Jun 17, 2022
4 commits in 4d92f07f34ba7fb7d7f207564942508f46c225d3..8d42b0e8794ce3787c9f7d6d88b02ae80ebe8d19
2022-06-10 01:11:04 +0000 to 2022-06-17 16:46:26 +0000
- Use specific terminology for sparse HTTP-based registry (rust-lang/cargo#10764)
- chore: Upgrade to clap 3.2 (rust-lang/cargo#10753)
- Improve testing framework for http registries (rust-lang/cargo#10738)
- doc: Improve example of using the links field (rust-lang/cargo#10728)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 18, 2022
Update cargo

4 commits in 4d92f07f34ba7fb7d7f207564942508f46c225d3..8d42b0e8794ce3787c9f7d6d88b02ae80ebe8d19
2022-06-10 01:11:04 +0000 to 2022-06-17 16:46:26 +0000
- Use specific terminology for sparse HTTP-based registry (rust-lang/cargo#10764)
- chore: Upgrade to clap 3.2 (rust-lang/cargo#10753)
- Improve testing framework for http registries (rust-lang/cargo#10738)
- doc: Improve example of using the links field (rust-lang/cargo#10728)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 18, 2022
Update cargo

4 commits in 4d92f07f34ba7fb7d7f207564942508f46c225d3..8d42b0e8794ce3787c9f7d6d88b02ae80ebe8d19
2022-06-10 01:11:04 +0000 to 2022-06-17 16:46:26 +0000
- Use specific terminology for sparse HTTP-based registry (rust-lang/cargo#10764)
- chore: Upgrade to clap 3.2 (rust-lang/cargo#10753)
- Improve testing framework for http registries (rust-lang/cargo#10738)
- doc: Improve example of using the links field (rust-lang/cargo#10728)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 18, 2022
Update cargo

4 commits in 4d92f07f34ba7fb7d7f207564942508f46c225d3..8d42b0e8794ce3787c9f7d6d88b02ae80ebe8d19
2022-06-10 01:11:04 +0000 to 2022-06-17 16:46:26 +0000
- Use specific terminology for sparse HTTP-based registry (rust-lang/cargo#10764)
- chore: Upgrade to clap 3.2 (rust-lang/cargo#10753)
- Improve testing framework for http registries (rust-lang/cargo#10738)
- doc: Improve example of using the links field (rust-lang/cargo#10728)
@ehuss ehuss added this to the 1.63.0 milestone Jun 22, 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