Skip to content

Conversation

@daxpedda
Copy link
Contributor

I noticed broken links on the proc-macros and them not showing as being re-exported on docs.rs.


[package.metadata.docs.rs]
all-features = true
targets = []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This tells docs.rs to build the default target only. pollsterss API is the same everywhere.
See https://docs.rs/about/metadata.

@@ -1,4 +1,5 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
Copy link
Contributor Author

@daxpedda daxpedda Mar 28, 2023

Choose a reason for hiding this comment

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

This is really nice because it shows the crate feature needed to use a specific API in the Rust documentation.
See rust-lang/rust#43781.

/// }
/// ```
///
/// [`pollster::block_on`]: https://docs.rs/pollster/0.3.0/pollster/fn.block_on.html
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bit annoying because it needs to be kept up-to-date with version bumps.
Initially I was thinking putting this to "latest" but this is more correct in the sense that old versions won't link to new versions ...

Copy link
Owner

Choose a reason for hiding this comment

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

That is a little annoying... Perhaps the macro crate could be made to depend on the main crate when building for docsrs, allowing us to directly link through to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried with dev-dependencies, but rust-lang/cargo#3475.
So not any way I know.

Copy link
Owner

Choose a reason for hiding this comment

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

Ah well. I'm sure this is fine for now.

@zesterer zesterer merged commit 767e6db into zesterer:master Mar 28, 2023
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.

2 participants