-
Notifications
You must be signed in to change notification settings - Fork 2.7k
frame/support: Link call documentation only in prod-modes #14283
Conversation
Signed-off-by: Alexandru Vasile <[email protected]>
} | ||
} else { | ||
// For the dev-mode do not provide a documenation link as it will break the | ||
// `cargo doc` if the pallet is private inside a test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it trying to document a test? I think anything testing should not need to be documented anyway.
The cargo doc
should not even look at this, is what i mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe after that substrate PR, we no longer propagate method.docs
and we do instead provide a link to [Pallet:: method]
. This link will cause the cargo doc
step on the cumulus on test/runtime/src/test_pallet.rs
, even tho it is declared as:
#[frame_support::pallet(dev_mode)]
pub mod pallet {
#[pallet::call]
impl<T: Config> Pallet<T> {
/// A test dispatchable for setting a custom head data in `validate_block`.
#[pallet::weight(0)]
pub fn set_custom_validation_head_data(
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes sense, sorry 🙈
I am surprised this was not identified by the dev-mode example in substrate.
bot merge |
…#14283) Signed-off-by: Alexandru Vasile <[email protected]>
After updating the
Cargo.lock
of Substrate in Cumulus, the doc CI step is failing withThis is related to a change done in the PR: https://github.com/paritytech/substrate/pull/14101/files.
This fixes the issue by removing the documentation link to private items, only for pallets started with
dev-mode
.Extracted from: paritytech/cumulus#2666.
// @paritytech/subxt-team