This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Create sp-weights crate to store weight primitives #12219
Merged
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
6e10966
Create sp-weights crate to store weight primitives
KiChjang 5e4dd1d
Merge remote-tracking branch 'origin/master' into kckyeung/sp-weights
KiChjang 43ab5e6
Fix templates
KiChjang e5bace0
Fix templates
KiChjang 87a1ff4
Fixes
KiChjang 6b1c48c
Fixes
KiChjang f17e1b2
cargo fmt
KiChjang 48a88cc
Fixes
KiChjang 19ae7dd
Fixes
KiChjang 4728a95
Use deprecated type alias instead of deprecated unit types
KiChjang 70b56ec
Use deprecated subtraits instead of deprecated hollow new traits
KiChjang 8415f32
Fixes
KiChjang 39ba7b9
Allow deprecation in macro expansion
KiChjang d7bcf1f
Add missing where clause during call macro expansion
KiChjang fb468e9
cargo fmt
KiChjang c51cde5
Fixes
KiChjang e4c44fa
cargo fmt
KiChjang ef1be20
Fixes
KiChjang 12c3e06
Fixes
KiChjang 1937813
Fixes
KiChjang 531986c
Fixes
KiChjang 51b7b21
Move FRAME-specific weight files back to frame_support
KiChjang d43dd83
Fixes
KiChjang 88223b7
Merge branch 'master' into kckyeung/sp-weights
shawntabrizi d029aa4
Update frame/support/src/dispatch.rs
KiChjang 029f121
Update frame/support/src/dispatch.rs
KiChjang f6dc099
Update frame/support/src/dispatch.rs
KiChjang 56407a5
Add missing header
KiChjang 3c5455a
Rewrite module docs
KiChjang eca462f
Merge remote-tracking branch 'origin/master' into kckyeung/sp-weights
KiChjang 3f8e33f
Fixes
KiChjang 785fe95
Fixes
KiChjang 8bcc6f1
Fixes
KiChjang 9e235f9
Fixes
KiChjang 1880f7a
cargo fmt
KiChjang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use deprecated subtraits instead of deprecated hollow new traits
- Loading branch information
commit 70b56ec99b2ee581667b66409c8447cdd56a8d44
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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'm attempting to try a novel way to deprecate types that have been moved, and one of the ways that I can think of is to create new subtraits and type alias and immediately deprecating them, telling the FRAME dev that the trait/type has been moved to another location.
Would be nice if I get some eye balls on this to ensure that this is worthwhile to pursue.
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.
The idea here is to create code that still works like the old way, but would emit a deprecation warning about the usage. This would make it easier for people to migrate over to the new location by allowing them to do so at a time of their choosing, while still having code that works.
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.
looks decent to me, just not sure when and based on what criteria are we going to remove the old code? we also have not removed the old macros now for more than a year and it is unclear to me when we are going to.
If there's no clear answer to this, I think it is also reasonable to just break the code downstream instead of keeping a lot of duplicate code around.
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.
You could stick a comment stating that the old methods will be removed once we get to date x.