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

Refactor InvocationStatus data structure in memory to improve ergonomics #2433

Open
slinkydeveloper opened this issue Dec 17, 2024 · 0 comments
Labels

Comments

@slinkydeveloper
Copy link
Contributor

Due to the fact that the InvocationStatus data structure has the Free variant, it requires often to have these noisy accessors like get_invocation_metadata etc. This also ends up in a lot of boilerplate/additional code we don't need, plus there is some common metadata we store in every status. I propose to simplify this a bit:

struct Invocation {
  // common stuff like invocation target etc we retain across all statuses
  
  status: InvocationStatus
}

enum InvocationStatus {
 // Variants with structs specific to statuses
}

This is only a code refactoring (the data structure we deserialize) and has nothing to do with storage changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant