Dev Diary 12/10/2018
- tried to extend the Deserialize with an associated error value to get statically checked error handling rather than serde's dynamic error handling. Failed, the type system is not expressive enough.
- probably should have given up sooner, this felt like I wasted a lot of time
- I did learn new things about the rust type system though...
- settled on stringly-typed errors like serde: https://github.com/ssbrs/legacy-msg/blob/master/src/lib.rs#L19
- that still left some trouble when implementing visitors, so gave them stringly typed errors as well
- probably should have given up sooner, this felt like I wasted a lot of time
- implemented legacy encoding for public keys, wasted a bunch of time error hunting until I realized that the base64 crate does weird things: https://github.com/ssbrs/ssb-multiformats
- set up fuzz tests and test data generation for legacy encoding of public keys, but this is blocked on the base64 bug
implementedcopy-pasted legacy-encoding for multihashes: https://github.com/ssbrs/ssb-multiformats/blob/master/src/multihash.rs
Next up:
- implementing legacy metadata and its json encoding
- message validation
- html version of the spec
- so, so much code clean up
- releases
- not yet on crates.io btw, I want to keep the flexibility of git dependencies until we know what kind of interfaces make sense
I won't manage to finish it this week, but reasonably soon I'll be done with the legacy stuff. And then I can start thinking about protocol improvements again.