Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Remove score_update_worst_case default impl #12043

Closed
wants to merge 3 commits into from

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Aug 16, 2022

Do not ever default impl feature gated trait functions, unless you want very weird stuff to happen.
Reason being is that someone will forget to enable the feature and you use the default impl without noticing.

#11976 should fix this permanently.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Aug 16, 2022
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
The job name - cargo-check-benches
The job logs - https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1749128

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Comment on lines 523 to 524
unimplemented!();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unimplemented!();
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm with Shawn here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it.

@shawntabrizi
Copy link
Member

Actually i dont get what this fixes. if the feature flag is not there, the whole function wont be there? what does it matter if there is a default impl?

@ggwpez
Copy link
Member Author

ggwpez commented Aug 16, 2022

Actually i dont get what this fixes. if the feature flag is not there, the whole function wont be there? what does it matter if there is a default impl?

It happens since the feature of the crate which contains the trait is enabled, but the one which should implement is not.
So then it uses the default impl.
It's a consequence of the features being messed up.

Comment on lines 523 to 524
unimplemented!();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm with Shawn here.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented Aug 18, 2022

Now the messed up features make Polkadot not build 💩
I will merge this with #11976

@ggwpez ggwpez closed this Aug 18, 2022
@bkchr bkchr deleted the oty-remove-eps-default-impl branch August 19, 2022 08:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants