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.
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
lang: Allow CPI return values #1598
lang: Allow CPI return values #1598
Changes from all commits
3190bae
c707d92
e37a325
c4079c4
ee380b2
7b50f25
194308c
177b9ad
9c85dd6
552c49d
03b5d26
63a6a15
951838d
3aa7f94
6f3a86a
dbb65f0
497245e
5c9650b
88aafe6
3eaf8fe
3eec70b
1a65dd2
b0abf61
eaea067
a3b0c77
8be3da6
2cf9be7
c0427b8
e8593b2
fd40f59
83d0e7c
b49bf6c
50b8f00
9b14549
594cf4d
f16c155
82f70e3
93f6478
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
an error here would be nice that hardcodes (with
.to_string
) that the return type must be of the formResult<()>
orResult<T>
the return code (and possibly even other code) depends on this exact return type and you can't use aliases like
type MyResult = Result<()>
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.
There is still some tests returning
ProgramResult
, this handles return types that don't confirm toResult<()>
orResult<T>
by defaulting to assuming it returns the unit type, these might break I think? I can commit it anyway and let CI figure it outThere 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.
yea I cant think of anything that can actually go wrong with your code defaulting to no return type. so no need for that extra check i think
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 think the way it works / what worked for me is that you dont have to specify the dependencies here. The
package.json
file in thetests
dir already has them and this folder can pull them as long as its defined as a npm workspace member in thepackage.json
intests
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.
Yea that is right