-
Notifications
You must be signed in to change notification settings - Fork 140
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
Allow importing type and capability values #1202
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.
Nice work!
Codecov Report
@@ Coverage Diff @@
## master #1202 +/- ##
==========================================
+ Coverage 77.18% 77.41% +0.23%
==========================================
Files 273 273
Lines 34209 34726 +517
==========================================
+ Hits 26403 26882 +479
- Misses 6736 6768 +32
- Partials 1070 1076 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Nice work also adding support for importing capabilities
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 good!
Shall we also address this TODO and the one below that: convertValues_test.go#L1840-L1841
This was added earlier when we didn't have the type/capability importing support.
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 good! The PR is only missing some type conversions, which could also be done in a follow up PR, and some of Supun's suggestions are still open
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.
@dsainati1 This looks like it is working now, but I still suggest applying Supun's code formatting suggestions. We try to keep lines short for readability reasons
Closes #491, #712
Description
This does two primary things:
Change the representation of types in
cadence.TypeValue
andcadence.Capability
to be acadence.Type
instead of astring
. This also requires implementation of encoding and decoding types to and from JSON.Implement
ImportType
to convert acadence.Type
into ainterpreter.StaticType
Update importing to allow for the importing of capability and type values
master
branchFiles changed
in the Github PR explorer