-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(minimal) Adapt to introduction of Env::Error (#837)
This is a "minimal" version of #833, accompanying / adapting to stellar/rs-soroban-env#638. If this minimal approach is preferred, this PR and stellar/rs-soroban-env#638 should be merged together. Otherwise the more-invasive pair #833 and stellar/rs-soroban-env#633 should be merged together. This one does much less rearranging and makes no difference to the emitted code at all. It just pushes around where the non-infallible `Env::Error` cases get escalated: formerly it happened in `impl Env for CheckedEnv`, now there's a new internal SDK function `internal::reject_err` that does the work. Infallible errors also need to be explicitly unwrapped in a bunch of places but this is just a type-level thing, operationally it's a no-op. (I should also note: I could do an "even more minimal" version of this where `soroban_sdk::env::Env` _does not implement_ `soroban_env_common:env::Env`, in which case the "error rejections" could be buried in the macro-generated code in the SDK and we could remove all the `.unwrap_infallible` calls in the SDK bodies. I don't know how important it is for the SDK's Env to implement the common Env.)
- Loading branch information
Showing
16 changed files
with
312 additions
and
127 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.