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

Bug 1076 conversion error flattening #1216

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Jan 31, 2024

This is the SDK companion to stellar/rs-soroban-env#1339 -- it won't work until that change has landed and its refs have updated to point to it.

There's an explanation of the change over there, but briefly: we were discarding meaningful errors when passing through the TryFromVal<ScVal> for Val and TryFromVal<Val> for ScVal impls in env-common, and now (or at least if 1339 lands) we're not. Instead of returning ConversionError we'd be returning Error.

The SDK happens to also have conversions with ConversionError signatures, and I've opted in this PR to not go a step further and actually change those to Error, instead re-burying the Error into ConversionError in the SDK, keeping the SDK APIs as they are. I could also change them. But I figured that could be left to @leighmcculloch's choice; he might want to keep the SDK's error repertoire simpler, I'm not sure.

@graydon
Copy link
Contributor Author

graydon commented Jan 31, 2024

See also #1218 for alternative approach

@graydon graydon force-pushed the bug-1076-conversion-error-flattening branch 2 times, most recently from 0d586a0 to 608c8e4 Compare February 1, 2024 03:58
@graydon graydon added this pull request to the merge queue Feb 2, 2024
Merged via the queue into main with commit b156ab4 Feb 2, 2024
21 checks passed
@graydon graydon deleted the bug-1076-conversion-error-flattening branch February 2, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants