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

[Deprecation] #[pallet:call_index] should be mandatory except in dev_mode #180

Open
2 tasks done
gupnik opened this issue Apr 24, 2023 · 5 comments
Open
2 tasks done
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework. T13-deprecation The current issue/pr is, or should be, part of a deprecation process.

Comments

@gupnik
Copy link
Contributor

gupnik commented Apr 24, 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.

Motivation

paritytech/substrate#11381 introduced call_index. However, it is still possible to create production pallets without specifying it.

Request

The expectation would be to make call_index mandatory in production. dev_mode can relax this requirement to support easy onboarding.

Solution

No response

Are you willing to help with this request?

Yes!

@KiChjang
Copy link
Contributor

Huh, I thought @ggwpez made a PR that makes call_index mandatory already?

@bkchr
Copy link
Member

bkchr commented Apr 24, 2023

It currently outputs a warning and that is a valid migration path.

@ggwpez
Copy link
Member

ggwpez commented Apr 24, 2023

The expectation would be to make call_index mandatory in production.

I would wait at least 6 months for that breaking change. And it could be a good candidate for trying #182

Current behaviour when no call_index is used:
dev mode: no print
standard mode: warning

@juangirini
Copy link
Contributor

I would wait at least 6 months for that breaking change. And it could be a good candidate for trying #182

This issue is rather about introducing a new breaking change than deprecating a feature, not sure if it's the best candidate for #182

@ggwpez
Copy link
Member

ggwpez commented Apr 24, 2023

This one is the one that i actually meant: paritytech/substrate#12894. It added a "deprecate" warning if there is no call_index on a call.
So we are deprecating implicit call indices, and the final breaking change would be to disallow them.
I therefore think it fits as an example for the deprecation process, since it would otherwise break code of devs that are unaware.

@juangirini juangirini changed the title #[pallet:call_index] should be mandatory except in dev_mode [Deprecation] #[pallet:call_index] should be mandatory except in dev_mode Apr 24, 2023
@juangirini juangirini transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework. and removed J0-enhancement labels Aug 25, 2023
@the-right-joyce the-right-joyce added T13-deprecation The current issue/pr is, or should be, part of a deprecation process. and removed I11-deprecation labels Sep 21, 2023
jonathanudd pushed a commit to jonathanudd/polkadot-sdk that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework. T13-deprecation The current issue/pr is, or should be, part of a deprecation process.
Projects
Status: Backlog
Development

No branches or pull requests

6 participants