Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cob: Simplify the ChangeGraph implementation
Merged did:key:z6MksDgS...SCRE opened 11 months ago

This patch removes the GraphBuilder from the ChangeGraph and simplifies the ChangeGraph::load method. Thus it makes the affected code shorter and easier to understand.

I stumbled across this while learning the codebase and found it very confusing. So I rewrote it for the sake of my own understanding and to apply my newly learned Rust skills.

The result looks quite nice, so I hope it is of some value to you as well :D

did:key:z6MksDgS...SCRE opened with revision 38aaca44 on base e0d18b86 +28 -85 11 months ago

This patch removes the GraphBuilder from the ChangeGraph and simplifies the ChangeGraph::load method. Thus it makes the affected code shorter and easier to understand.

I stumbled across this while learning the codebase and found it very confusing. So I rewrote it for the sake of my own understanding and to apply my newly learned Rust skills.

The result looks quite nice, so I hope it is of some value to you as well :D

fintohaps rejected 11 months ago
fintohaps commented on revision 1 11 months ago

Heya, thanks for the contribution! While this definitely looks like simpler code, it does not seem to pass the tests :’)

You can run the tests for that crate by doing cargo test -p radicle-cobs (or check out cargo-nextest).

Once they’re passing, you can move on to cargo test -p radicle

did:key:z6MksDgS...SCRE pushed revision 2 482aab40 on base e0d18b86 +29 -85 11 months ago

Fix the failing tests

did:key:z6MksDgS...SCRE commented on revision 1 11 months ago

I’m terribly sorry D: This slipped through my last local changes. I usually test my code! Still thanks for the interesting cargo-nextest reference.

fintohaps accepted 11 months ago

Thanks! Confirmed that the tests worked and it really is much cleaer what’s going on now :)

fintohaps pushed revision 3 858cede3 on base 4cd0782f +29 -85 11 months ago

Rebased

fintohaps merged revision 858cede3 at eceb7f29 11 months ago