C4K3 / ozelot

Rust library for handling all MCMODERN networking
Creative Commons Zero v1.0 Universal
34 stars 9 forks source link

Add getters for all fields, even if undocumented #4

Closed NJAldwin closed 6 years ago

NJAldwin commented 6 years ago

Some of the fields on some of the packets are missing their :getter documentation. However, that leaves client code unable to access those fields on the packets! This changes the generation script to output getters for all fields, even those which are undocumented.

C4K3 commented 6 years ago

The original intention was that not having getter docs defined meant that library consumers should not be able to get that field, but this meaning is mostly lost. In any case, it would make more sense to add an explicit not-accessible declaration or something for the fields that for whatever reason we don't want readable.

On a side-note, it would be nice to drop the Clojure generation and rewrite it all with macros 1.1.

Cherry-picked in as a5fe8b860544feb24d5d9e6e5f326970820dd460

C4K3 commented 6 years ago

Thanks :)