clojusc / protobuf

A Clojure interface to Google's protocol buffers
https://clojusc.github.io/protobuf/
Eclipse Public License 1.0
72 stars 8 forks source link

Issue with enums and keywords #25

Closed oubiwann closed 6 years ago

oubiwann commented 6 years ago

When you define a protobuf with enums such as "HOME", "WORK", and "MOBILE", protobuf represents these as :home, :work, and :mobile. However, a null pointer exception occurs if you try to use the keywords when creating a new message; if the protobuf was defined with a string in all caps, that's what needs to be used when creating a message, regardless of representation.

The ambiguity arising from this is not good -- it should be one or the other (i.e., don't convert, or allow keywords to be used when creating a message).

oubiwann commented 6 years ago

This should now be fixed by @jvia’s PR #31 — thanks!

oubiwann commented 6 years ago

Confirmed as fixed; closing.