Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#[pallet::call] doesn't handle feature gates correctly #2646

Closed
2 tasks done
gupnik opened this issue Dec 7, 2023 · 0 comments · Fixed by #2677
Closed
2 tasks done

#[pallet::call] doesn't handle feature gates correctly #2646

gupnik opened this issue Dec 7, 2023 · 0 comments · Fixed by #2677
Assignees
Labels
I2-bug The node fails to follow expected behavior.

Comments

@gupnik
Copy link
Contributor

gupnik commented Dec 7, 2023

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

The current macro expansion for #[pallet::call] doesn't handle the feature gates correctly, causing an error.

Steps to reproduce

For example, while trying to feature gate do_task in #1343 like so:

#[cfg(feature = "experimental")]
#[pallet::call_index(8)]
#[pallet::weight(task.weight())]
pub fn do_task(origin: OriginFor<T>, task: T::RuntimeTask) -> DispatchResultWithPostInfo {
...
}

the generated call enum still has do_task without the respective feature gate.

@gupnik gupnik added I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known. labels Dec 7, 2023
@gupnik gupnik self-assigned this Dec 7, 2023
@gupnik gupnik removed the I10-unconfirmed Issue might be valid, but it's not yet known. label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant