Skip to content

Refactor InvocationStatus data structure in memory to improve ergonomics #2433

Open
@slinkydeveloper

Description

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.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions