This repository was archived by the owner on Nov 15, 2023. It is now read-only.
frame/support: Link call documentation only in prod-modes#14283
Merged
paritytech-processbot[bot] merged 1 commit intomasterfrom Jun 1, 2023
Merged
frame/support: Link call documentation only in prod-modes#14283paritytech-processbot[bot] merged 1 commit intomasterfrom
paritytech-processbot[bot] merged 1 commit intomasterfrom
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
ggwpez
reviewed
Jun 1, 2023
| } | ||
| } 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. |
Member
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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(
...
sam0x17
approved these changes
Jun 1, 2023
kianenigma
approved these changes
Jun 1, 2023
Contributor
kianenigma
left a comment
There was a problem hiding this comment.
Yeah makes sense, sorry 🙈
I am surprised this was not identified by the dev-mode example in substrate.
Contributor
Author
|
bot merge |
nathanwhit
pushed a commit
to nathanwhit/substrate
that referenced
this pull request
Jul 19, 2023
…#14283) Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After updating the
Cargo.lockof 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