-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
In 0.9.3 when a Protocol Buffer message contains a field named: "values", all of the fields (except the "values" field) are missing in the generated code.
The message:
message A {
string field1 = 1;
string values = 2;
string field3 = 3;
}
Produces:
(defrecord A-record [values]
pb/Writer
(serialize [this os]
(serdes.core/write-String 2 {:optimize true} (:values this) os))
pb/TypeReflection
(gettype [this]
"com.example.ab.A"))
(s/def :com.example.ab.A/values string?)
(s/def ::A-spec (s/keys :opt-un [:com.example.ab.A/values ]))
(def A-defaults {:values "" })
A similar message containing a field named: "values2"
message B {
string field1 = 1;
string values2 = 2;
string field3 = 3;
}
Produces the correct record
(defrecord B-record [field1 values2 field3]
pb/Writer
(serialize [this os]
(serdes.core/write-String 1 {:optimize true} (:field1 this) os)
(serdes.core/write-String 2 {:optimize true} (:values2 this) os)
(serdes.core/write-String 3 {:optimize true} (:field3 this) os))
pb/TypeReflection
(gettype [this]
"com.example.ab.B"))
(s/def :com.example.ab.B/field1 string?)
(s/def :com.example.ab.B/values2 string?)
(s/def :com.example.ab.B/field3 string?)
(s/def ::B-spec (s/keys :opt-un [:com.example.ab.B/field1 :com.example.ab.B/values2 :com.example.ab.B/field3 ]))
(def B-defaults {:field1 "" :values2 "" :field3 "" })
Metadata
Metadata
Assignees
Labels
No labels