-
Notifications
You must be signed in to change notification settings - Fork 138
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
State migration for type values with two or more interfaces #2981
Conversation
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.
So this is just loading and regenerating any of these types to make them ordered correctly right? If so, that makes sense to me!
@dsainati1 Correct! Type values which contain an intersection type are simply returned as-is, there is no conversion to a different value. However, when the type value is used as dictionary key, returning the type value from the migration value will cause it to be re-inserted into the dictionary, re-hashing the type value, which in turn will use the fixed type ID function which sorts the intersection type's interface type set. |
Co-authored-by: Supun Setunga <[email protected]>
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 26fab85 Collapsed results for better readability
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2981 +/- ##
==========================================
- Coverage 80.01% 79.98% -0.03%
==========================================
Files 354 356 +2
Lines 82705 82862 +157
==========================================
+ Hits 66177 66279 +102
- Misses 14174 14228 +54
- Partials 2354 2355 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Closes #2681
Description
Add a state migration which re-stores run-time type values (
Type
) which have an intersection type with two or more interfaces. In that case, the hash value changes because the type ID generation now sorts the interface set.Heavily based on the great Account type migration from @SupunS. 👌 🙏
master
branchFiles changed
in the Github PR explorer