Skip to content

Commit 01ea45c

Browse files
authored
Fix deps for local docs build for Rust 1.75.0 (#2896)
- Fix docs deps build issue (servo/rust-smallvec#327) (Please forgive me and LMK if there are processes I need to follow for the bump a dep here I am not aware of). - Fix links for `meta_contributing` docs, internal and external. - `cargo +nightly fmt` for `/docs/...` files
1 parent ce4e549 commit 01ea45c

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/mermaid/polkadot_sdk_parachain.mmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ flowchart LR
55
end
66

77
FRAME -.-> ParachainRuntime
8-
Substrate[Substrate Node Libraries] -.-> ParachainNoe
8+
Substrate[Substrate Node Libraries] -.-> ParachainNode
99

1010
CumulusC[Cumulus Node Libraries] -.-> ParachainNode
1111
CumulusR[Cumulus Runtime Libraries] -.-> ParachainRuntime

docs/sdk/src/guides/your_first_pallet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ pub mod pallet {
365365
// ensure sender has enough balance, and if so, calculate what is left after `amount`.
366366
let sender_balance = Balances::<T>::get(&sender).ok_or("NonExistentAccount")?;
367367
if sender_balance < amount {
368-
return Err("InsufficientBalance".into())
368+
return Err("InsufficientBalance".into());
369369
}
370370
let reminder = sender_balance - amount;
371371

docs/sdk/src/meta_contributing.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
//! > high level tutorial. They should be explained in the rust-doc of the corresponding type or
5555
//! > macro.
5656
//!
57-
//! 2. 🧘 Less is More: For reasons mentioned [above](#crate::why-rust-docs), the more concise this
58-
//! crate is, the better.
57+
//! 2. 🧘 Less is More: For reasons mentioned [above](#why-rust-docs), the more concise this crate
58+
//! is, the better.
5959
//! 3. √ Don’t Repeat Yourself – DRY: A summary of the above two points. Authors should always
6060
//! strive to avoid any duplicate information. Every concept should ideally be documented in
6161
//! *ONE* place and one place only. This makes the task of maintaining topics significantly
@@ -69,8 +69,7 @@
6969
//! > what topics are already covered in this crate, and how you can build on top of the information
7070
//! > that they already pose, rather than repeating yourself**.
7171
//!
72-
//! For more details about documenting guidelines, see:
73-
//! <https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/DOCUMENTATION_GUIDELINES.md#L23>
72+
//! For more details see the [latest documenting guidelines](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/DOCUMENTATION_GUIDELINES.md).
7473
//!
7574
//! #### Example: Explaining `#[pallet::call]`
7675
//!
@@ -133,14 +132,16 @@
133132
//! compromise, but in the long term, we should work towards finding a way to maintain different
134133
//! revisions of this crate.
135134
//!
136-
//! ## How to Build
135+
//! ## How to Develop Locally
137136
//!
138-
//! To build this crate properly, with with right HTML headers injected, run:
137+
//! To view the docs specific [`crate`] locally for development, including the correct HTML headers
138+
//! injected, run:
139139
//!
140-
//! ```no_compile
141-
//! RUSTDOCFLAGS="--html-in-header $(pwd)/docs/sdk/headers/toc.html" cargo doc -p polkadot-sdk-docs
140+
//! ```sh
141+
//! SKIP_WASM_BUILD=1 RUSTDOCFLAGS="--html-in-header $(pwd)/docs/sdk/headers/toc.html" cargo doc -p polkadot-sdk-docs --no-deps --open
142142
//! ```
143143
//!
144-
//! adding `--no-deps` would speed up the process while development. If even faster build time for
145-
//! docs is needed, you can temporarily remove most of the substrate/cumulus dependencies that are
146-
//! only used for linking purposes.
144+
//! If even faster build time for docs is needed, you can temporarily remove most of the
145+
//! substrate/cumulus dependencies that are only used for linking purposes.
146+
//!
147+
//! For more on local development, see [`crate::reference_docs::development_environment_advice`].

0 commit comments

Comments
 (0)