fix: docsrs builds final (#2235)

* fix

* fix: middleware

* fix: update rustc flags

* docs: add comment
This commit is contained in:
DaniPopes 2023-03-08 23:58:44 +01:00 committed by GitHub
parent 72428503cf
commit f9086e703c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 36 additions and 18 deletions

View File

@ -38,6 +38,7 @@ default-members = [
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.playground] [package.metadata.playground]

View File

@ -57,4 +57,5 @@ openssl = ["ethers-contract-abigen/openssl"]
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]

View File

@ -43,6 +43,7 @@ getrandom = { version = "0.2", features = ["js"] }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[features] [features]

View File

@ -30,4 +30,5 @@ eyre = "0.6"
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]

View File

@ -69,7 +69,8 @@ pub use once_cell::sync::Lazy;
#[cfg(feature = "eip712")] #[cfg(feature = "eip712")]
pub use ethers_derive_eip712::*; pub use ethers_derive_eip712::*;
// For Abigen expansions in docs.rs builds. // For macro expansions only, not public API.
// See: [#2235](https://github.com/gakonst/ethers-rs/pull/2235)
#[doc(hidden)] #[doc(hidden)]
#[allow(unused_extern_crates)] #[allow(unused_extern_crates)]
@ -77,23 +78,15 @@ extern crate self as ethers_contract;
#[doc(hidden)] #[doc(hidden)]
#[allow(unused_extern_crates)] #[allow(unused_extern_crates)]
#[cfg(docsrs)]
extern crate self as ethers; extern crate self as ethers;
#[doc(hidden)] #[doc(hidden)]
#[cfg(docsrs)]
pub mod core {
pub use ethers_core::*;
}
#[doc(hidden)]
#[cfg(docsrs)]
pub mod contract { pub mod contract {
pub use crate::*; pub use crate::*;
} }
#[doc(hidden)] #[doc(hidden)]
#[cfg(docsrs)] pub use ethers_core as core;
pub mod providers {
pub use ethers_providers::*; #[doc(hidden)]
} pub use ethers_providers as providers;

View File

@ -66,4 +66,5 @@ macros = ["syn", "cargo_metadata", "once_cell"]
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]

View File

@ -42,6 +42,7 @@ tracing-subscriber = { version = "0.3", default-features = false, features = ["e
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[features] [features]

View File

@ -12,6 +12,7 @@ keywords = ["ethereum", "web3", "celo", "ethers"]
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]

View File

@ -40,3 +40,19 @@ pub use timelag::TimeLag;
/// [`Middleware`](ethers_providers::Middleware) in a concise way /// [`Middleware`](ethers_providers::Middleware) in a concise way
pub mod builder; pub mod builder;
pub use builder::MiddlewareBuilder; pub use builder::MiddlewareBuilder;
// For macro expansions only, not public API.
// See: [#2235](https://github.com/gakonst/ethers-rs/pull/2235)
#[doc(hidden)]
#[allow(unused_extern_crates)]
extern crate self as ethers;
#[doc(hidden)]
pub use ethers_contract as contract;
#[doc(hidden)]
pub use ethers_core as core;
#[doc(hidden)]
pub use ethers_providers as providers;

View File

@ -12,6 +12,7 @@ keywords = ["ethereum", "web3", "celo", "ethers"]
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]

View File

@ -12,6 +12,7 @@ keywords = ["ethereum", "web3", "celo", "ethers"]
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]

View File

@ -83,11 +83,6 @@
#![deny(rustdoc::broken_intra_doc_links)] #![deny(rustdoc::broken_intra_doc_links)]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms), allow(dead_code, unused_variables))))] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms), allow(dead_code, unused_variables))))]
// For macro expansion
#[doc(hidden)]
#[allow(unused_extern_crates)]
extern crate self as ethers;
#[doc(inline)] #[doc(inline)]
pub use ethers_addressbook as addressbook; pub use ethers_addressbook as addressbook;
#[doc(inline)] #[doc(inline)]
@ -129,3 +124,8 @@ pub mod prelude {
#[cfg(feature = "ethers-solc")] #[cfg(feature = "ethers-solc")]
pub use super::solc::*; pub use super::solc::*;
} }
// For macro expansions only, not public API.
#[doc(hidden)]
#[allow(unused_extern_crates)]
extern crate self as ethers;