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

Err reform #806

Merged
merged 1 commit into from
May 17, 2023
Merged

Err reform #806

merged 1 commit into from
May 17, 2023

Conversation

graydon
Copy link
Contributor

@graydon graydon commented May 12, 2023

This is a WIP branch that's quite repetitive but ultimately fairly simple, that performs a variety of fixes related to events and errors. I think it's all stuff we've already agreed "needs to happen" and I figured I'd just try to get it all done this week while everyone else was away from keyboard.

Hopefully I'll be done soon but it's going to probably take another day or two of just grinding through errors. Here's basically what it covers:

  1. Renames Status to Error (the most-agreeable part of A bunch of simple renamings #689)
  2. Reassigns all error codes to a smaller, consolidated set, fixing Another round of host error classification #225 (i.e. paired with change Err reform stellar-xdr#92 where the set is explained, and a corresponding WIP rs-stellar-xdr change)
  3. Deletes DebugEvent entirely, moving all diagnostics to structured-event form, answering at least some of Revisit diagnostic/debug event design #731
  4. As a result, assigns a causal contract ID to every debug event, fixing Debug events are ambiguous as to which contract generated them #772 (and DebugEvents do not have a contract ID which makes debug events ambiguous #438 which is I think an earlier dupe of the same issue)
  5. Also as a result, externalizes full objects when diagnostic mode is turned on, causing them to render fully, fixing Object type Debug implementations should render contents #442
  6. Fixes the double-faulting issue in Detect/avoid double-faulting in the host runtime #687
  7. Adds a bunch more diagnostic context in cases where we're generating errors (needed since we're simplifying the codes), fixing Add more debug context in places errors are generated #673

I thought I'd post it for feedback early, in case anyone really hates the direction. I'm pretty keen on how it's turning out so far -- it seems like it really addresses a lot of the shortcomings we've identified so far and most of the churn is just obvious cleanup after the main structural changes -- but I'm interested to know if it looks to anyone like it's going the wrong direction.

@graydon graydon requested review from sisuresh and a team as code owners May 12, 2023 02:01
@graydon graydon force-pushed the err-reform branch 10 times, most recently from c68cdce to 8fd11b4 Compare May 14, 2023 05:35
soroban-env-common/src/error.rs Outdated Show resolved Hide resolved
soroban-env-host/src/auth.rs Outdated Show resolved Hide resolved
soroban-env-host/src/events/mod.rs Show resolved Hide resolved
soroban-env-host/src/host/metered_map.rs Outdated Show resolved Hide resolved
soroban-env-host/src/host/metered_vector.rs Outdated Show resolved Hide resolved
@graydon graydon force-pushed the err-reform branch 3 times, most recently from cb01700 to 866572c Compare May 17, 2023 03:30
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