-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat(types): Enable failable conversions to/from sdk and core types #4871
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
3037ea5
to
92d3785
Compare
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, I don't think we should do this. These types should be infallibly convertible. The only things that aren't right now are the Identifier
and signatures and those are only because there are no functions defined to do it because this behavior isn't part of their public API. However, those conversions are still infallible as the types are represented the same. This introduces a lot of unnecessary complexity IMO for no gain.
However, please tell me if there is a reason I am missing!
I totally understand your perspective, but here’s why we believe this change is still worthwhile:
|
It is about users being able to feed bad data. That's the reason sui did this IMO. |
Description of change
Merging upstream changes: MystenLabs/sui#19414
This one is needed for the next fix: #4687
Avoid panicking in sdk/core conversion by replacing
From
toTryFrom
and introduce the new error typeSdkTypeConversionError
.Links to any relevant issues
Close #4776
Type of change
Change checklist