8000 Change `#[cfg(docsrs)]` to `#[cfg(doc)]` on `use` by Kixunil · Pull Request #1504 · rust-bitcoin/rust-bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change #[cfg(docsrs)] to #[cfg(doc)] on use #1504

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

Merged
merged 1 commit into from
Dec 31, 2022

Conversation

Kixunil
Copy link
Collaborator
@Kixunil Kixunil commented Dec 23, 2022

The additional use items were added to improve the style of documentation. Because they were only used for doc they were cfged. But because this is independent from being built by docs.rs the cfg should've been doc not docsrs.

IOW docsrs means roughly all(doc, nightly) and the added items are unrelated to nightly.

Do we want CI for this kind of thing? It feels a bit too much to me but if someone sends a PR I probably won't reject it.

@Kixunil Kixunil added bug documentation P-low Low priority trivial Obvious, easy and quick to review (few lines or doc-only...) labels Dec 23, 2022
@tcharding
Copy link
Member

Ah sweet, this is what I was looking for yesterday when doing rust-bitcoin/rust-miniscript#507

tcharding
tcharding previously approved these changes Dec 23, 2022
Copy link
Member
@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

ACK 95eef7f3c2c975a2111d8a3a0adf35bcd0205a54

@tcharding
Copy link
Member

I did #1505 @Kixunil prompted by this and my broken addition of || exit 1 recently :)

apoelstra
apoelstra previously approved these changes Dec 31, 2022
Copy link
Member
@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 95eef7f3c2c975a2111d8a3a0adf35bcd0205a54

@apoelstra
Copy link
Member

Needs rebase.

The additional `use` items were added to improve the style of
documentation. Because they were only used for doc they were `cfg`ed.
But because this is independent from being built by `docs.rs` the `cfg`
should've been `doc` not `docsrs`.

IOW `docsrs` means roughly `all(doc, nightly)` and the added items are
unrelated to `nightly`.
@Kixunil Kixunil dismissed stale reviews from apoelstra and tcharding via 8d58ee2 December 31, 2022 19:58
Copy link
Member
@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 8d58ee2

Copy link
Member
@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

utACk 8d58ee2

@apoelstra apoelstra merged commit ea43930 into rust-bitcoin:master Dec 31, 2022
@Kixunil Kixunil deleted the improve-doc-attr branch January 1, 2023 13:27
apoelstra added a commit that referenced this pull request Feb 10, 2023
41f2dcf Improve test coverage for docs build (Tobin C. Harding)
b4c14a4 hashes: Use automatic link (Tobin C. Harding)
96e8a08 ci: Remove redundant || exit (Tobin C. Harding)

Pull request description:

  Currently the docs build commands in `hashes` and `bitcoin` differ, they should be the same.

  Add a command `cargo doc` to improve coverage e.g., recently we botched the feature guarding but since CI only runs `cargo rustdoc` with custom compiler conditional set we didn't catch it.

  Done after seeing: #1504 and CI should fail on this PR until 1504 is in.

ACKs for top commit:
  apoelstra:
    ACK 41f2dcf
  Kixunil:
    ACK 41f2dcf

Tree-SHA512: 7cde68292cfc6f32b75d066e188e7c418ee251f9a5abc57fbd642ba33e9cd5bd8ef7c5ba7cffd206acae6ddec2f8c3db38c8c911a4319e979158666b8225953d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P-low Low priority trivial Obvious, easy and quick to review (few lines or doc-only...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0