You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Motivation
The `Context` trait currently duplicates the `ReadableKeyValue` and
`WritableKeyValue` traits.
## Proposal
Instead, provide direct access to the store so there's no need to pass
through these calls. This shrinks the `Context` trait and its
implementers quite considerably in preparation for
#1948.
While we're at it, factor `BaseKey` out into a separate type for the
same reason.
Additionally, I noticed we've maintained the `Local`/`Send` split for
our traits, a distinction that we chose to abandon in the codebase in
favour of conditional compilation, so I merged those. This led to some
knock-on effects:
- we get to remove `async-trait` in a lot of places, replacing its trait
transformation functionality with `trait-variant` where necessary — this
simplifies the implementation of the traits, since implementers don't
need to re-iterate the `Send`ness of the trait
- since we can now no longer implement things for `*Store` without
implementing them for `Local*Store`, we need to be more careful about
the propagation of `Send`/`Sync` traits. Notably this required making
GraphQL support conditional, which could even be extended to a feature
flag in the future (just by modifying `Cargo.toml` and `build.rs`, since
I made use of the `with_*` alias pattern).
In addition it seems that `cargo machete` detected some unused
dependencies in our workspace and decided to remove them.
## Test Plan
CI.
## Release Plan
- Nothing to do / These changes follow the usual release cycle.
## Links
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
0 commit comments