From f6b20a36813a6717c62d8485c796f95c41d05e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Mon, 23 Dec 2024 23:50:11 +0200 Subject: [PATCH 1/4] doc: add `__abi-generate` for docs.rs of `near-sdk` --- near-sdk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/near-sdk/Cargo.toml b/near-sdk/Cargo.toml index 6bb68746d..4690d8010 100644 --- a/near-sdk/Cargo.toml +++ b/near-sdk/Cargo.toml @@ -98,4 +98,4 @@ __abi-generate = ["abi", "near-sdk-macros/__abi-generate"] __macro-docs = [] [package.metadata.docs.rs] -features = ["unstable", "legacy", "unit-testing", "__macro-docs"] +features = ["unstable", "legacy", "unit-testing", "__macro-docs", "__abi-generate"] From 573afc2c4cd3ea1946eec0f229b710009e6e8de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Mon, 23 Dec 2024 23:52:02 +0200 Subject: [PATCH 2/4] doc: add `__abi-generate` for docs.rs of `near-sdk-macros` --- near-sdk-macros/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/near-sdk-macros/Cargo.toml b/near-sdk-macros/Cargo.toml index 2a3a5ec9a..1f0388d44 100644 --- a/near-sdk-macros/Cargo.toml +++ b/near-sdk-macros/Cargo.toml @@ -34,3 +34,6 @@ prettyplease = { version = "0.2.15" } abi = [] __abi-embed = ["abi"] __abi-generate = ["abi"] + +[package.metadata.docs.rs] +features = ["__abi-generate"] From ee162d33e4cb06832e5330e0a14d42474de135ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Mon, 23 Dec 2024 23:56:15 +0200 Subject: [PATCH 3/4] doc: add `abi` feature for docs.rs of `near-contract-standards` --- near-contract-standards/Cargo.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/near-contract-standards/Cargo.toml b/near-contract-standards/Cargo.toml index e4ab1dfe9..a65ff0858 100644 --- a/near-contract-standards/Cargo.toml +++ b/near-contract-standards/Cargo.toml @@ -24,4 +24,7 @@ near-sdk = { path = "../near-sdk", default-features = false, features = [ [features] default = [] -abi = ["near-sdk/abi"] +abi = ["near-sdk/__abi-generate"] + +[package.metadata.docs.rs] +features = ["abi"] From 2ebd70522b9a4258e7376a04325e8cd54e769a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Tue, 24 Dec 2024 00:04:03 +0200 Subject: [PATCH 4/4] ci: update workflows to test doc with __abi-generate or abi features --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 06bda06c8..ca9fb1686 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -123,7 +123,7 @@ jobs: env: RUSTDOCFLAGS: -D warnings run: | - cargo doc -p near-sdk --features unstable,legacy,unit-testing,__macro-docs - cargo doc -p near-sdk-macros - cargo doc -p near-contract-standards --no-deps + cargo doc -p near-sdk --features unstable,legacy,unit-testing,__macro-docs,__abi-generate + cargo doc -p near-sdk-macros --features __abi-generate + cargo doc -p near-contract-standards --no-deps --features abi cargo doc -p near-sys