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

generate docs for feature gated items #1332

Merged
merged 15 commits into from Jan 12, 2024

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Dec 29, 2023

I noticed that the stuff hidden behind the unstable-light-client doesn't show up on docs.rs/subxt which this PR fixes.

docsrs is still unstable and needs to enabled if one wants to use it, rust-lang/rust#43781

@niklasad1 niklasad1 requested a review from a team as a code owner December 29, 2023 16:17
@niklasad1 niklasad1 force-pushed the na-generate-docs-for-feature-gated-items branch from 32e6762 to 2cc5d2f Compare January 2, 2024 11:04
codegen/Cargo.toml Outdated Show resolved Hide resolved
@@ -25,6 +25,7 @@ pub trait Signer<T: Config> {
}

#[cfg(feature = "substrate-compat")]
#[cfg_attr(docsrs, doc(cfg(feature = "substrate-compat")))]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This line that we have to add below each feature is sortof ugly! I'm not really familiar with it; what does it do? I also wonder whether we could avoid this line duplication somehow.

Copy link
Member Author

@niklasad1 niklasad1 Jan 3, 2024

Choose a reason for hiding this comment

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

agree, we could write a macro for it as we have in jsonrpsee

subxt/src/lib.rs Outdated Show resolved Hide resolved
@niklasad1 niklasad1 merged commit 437ff7e into master Jan 12, 2024
11 checks passed
@niklasad1 niklasad1 deleted the na-generate-docs-for-feature-gated-items branch January 12, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants