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

Add container static types #1125

Merged
merged 89 commits into from
Aug 25, 2021
Merged

Add container static types #1125

merged 89 commits into from
Aug 25, 2021

Conversation

SupunS
Copy link
Member

@SupunS SupunS commented Aug 24, 2021

Closes #870

Description

Add static type information to containers (arrays and dictionaries)


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

turbolent and others added 30 commits June 28, 2021 14:49
turbolent and others added 19 commits July 12, 2021 15:53
Return a dedicated error when decoding fails due to an unsupported CBOR tag
Sync `feature/container-static-types` branch  with master
 Infer static-type from imported array/dictionary values
Add container mutation check for arrays and dictionaries
@SupunS SupunS self-assigned this Aug 24, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2021

Codecov Report

Merging #1125 (5b2c6ce) into master (31d41e7) will decrease coverage by 1.97%.
The diff coverage is 26.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1125      +/-   ##
==========================================
- Coverage   75.51%   73.53%   -1.98%     
==========================================
  Files         271      272       +1     
  Lines       33404    34458    +1054     
==========================================
+ Hits        25226    25340     +114     
- Misses       7037     7957     +920     
- Partials     1141     1161      +20     
Flag Coverage Δ
unittests 73.53% <26.72%> (-1.98%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runtime/interpreter/dynamictype.go 65.71% <ø> (ø)
runtime/interpreter/errors.go 23.14% <0.00%> (-0.90%) ⬇️
runtime/interpreter/magic.go 100.00% <ø> (ø)
runtime/interpreter/primitivestatictype.go 76.73% <ø> (+19.80%) ⬆️
runtime/sema/authaccount_contracts.go 100.00% <ø> (ø)
runtime/sema/authaccount_type.go 100.00% <ø> (ø)
runtime/sema/crypto_algorithm_types.go 83.01% <ø> (ø)
runtime/stdlib/flow.go 82.40% <ø> (ø)
types.go 57.72% <ø> (ø)
runtime/interpreter/decode_v4.go 13.64% <13.64%> (ø)
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31d41e7...5b2c6ce. Read the comment docs.

@SupunS SupunS marked this pull request as ready for review August 24, 2021 23:03
@SupunS SupunS requested a review from turbolent as a code owner August 24, 2021 23:03
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Looks like there are two, similar, TODOs that I think we should resolve before merging.

Other than that, I think we already reviewed all the PRs individually, so don't need a full re-review of it all, and a quick look over it also looks good.

Can't wait to ⛵ this!

runtime/interpreter/value.go Outdated Show resolved Hide resolved
runtime/interpreter/value.go Outdated Show resolved Hide resolved
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

🎉

@SupunS SupunS merged commit 32e0869 into master Aug 25, 2021
@SupunS SupunS deleted the feature/container-static-types branch December 3, 2021 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement StaticType() for arrays and dictionaries
3 participants