-
Notifications
You must be signed in to change notification settings - Fork 145
Introduce InclusiveRange<T: Integer> type
#2523
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
Conversation
03b7e50 to
fd72061
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feature/range-type #2523 +/- ##
======================================================
+ Coverage 79.38% 79.62% +0.24%
======================================================
Files 333 336 +3
Lines 78748 79713 +965
======================================================
+ Hits 62514 63475 +961
+ Misses 13928 13871 -57
- Partials 2306 2367 +61
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Range<T: Integer> typeInclusiveRange<T: Integer> type
dc8d242 to
5b05232
Compare
abdda40 to
12eb1cc
Compare
turbolent
left a comment
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.
Great work!
dsainati1
left a comment
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.
Can you make a feature/range-type branch that includes all the Range changes, so we can put them in one place them merge them to master together?
|
@dsainati1 So I don't have the access to do that. Can you please create one for me? I'll target this PR on that branch after that. Thanks! |
|
@darkdrag00nv2 created a new branch feature/range-type and changed the base to it. |
|
Incorporated half of the suggestions. A few of them are remaining. |
|
@SupunS @dsainati1 This is ready for another round of review. Thanks! |
|
The small integer cache was still not thread-safe and caused data races to be reported (https://github.com/onflow/cadence/actions/runs/6398301138/job/17368137493?pr=2523#step:6:58), so I improved it in 1af52af |
turbolent
left a comment
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.
Coverage is updated now and should be helpful.
turbolent
left a comment
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.
Great work! 👏👏
I think we should get this merged in the current state, and then then potentially remaining work (e.g. making ranges storable) can be addressed in a follow-up PR.
Could you please have a final look @SupunS @dsainati1 ?
SupunS
left a comment
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.
Should be good to merge in the current state 👍
@darkdrag00nv2 Can you maybe create separate issues for the remaining work / tech-debt, so they won't fall through the cracks
|
@SupunS Lets merge? I'll send follow-up PRs post that on the fixes and future features such as |
|
@darkdrag00nv2 Can you please create issues for any remaining open discussions (e.g: #2523 (comment), #2523 (comment)) and resolve those? Then we can merge the PR. There is a PR restriction that is enforced on this repo, which blocks merging until all conversations are resolved |
|
@SupunS Thanks, Filed all the issues. |
Work towards #2482
Work towards onflow/flips#96
Work towards onflow/developer-grants#179
Description
Adds a new
InclusiveRange<T: Integer>type to Cadence.Implemented the following:
CompositeValuefor easy support for transfer, encoding and decodingSupport for looping inside
for-inwill be added in a separate PR.masterbranchFiles changedin the Github PR explorer