Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle: repository traits
Open did:key:z6MkvAdx...kexk opened 2 years ago crate=radicle type=refactor

While writing the V2 fetch code it was noted that there seemed to be overlapping code that performed the same actions with maybe some slight differences. Thankfully, a lot of thos were smoothed out to use Repository. However, in cases like ValidateRepository, the behaviour still ended up being repeated due to very subtle usage of the Cached type. Another note is that certain repository write actions, like creating a reference, were not encapsulated in a trait.

We should make an effort to find and define clear boundaries of what the capabilities we require out of repositories and have a good set of traits to employ those capabilities.

I’m of the opinion that it should avoid being a kitchen-sink style trait, because then we end up avoiding implementing a trait for a new type because the majority of methods will end up being unimplemented!.