You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use java classes generated from this proto file:
syntax="proto3";
packageexample;
// Message with a repeated field of one typemessageResponseTypeOne {
repeatedMessageTypeOnefield=1;
}
// Message with a repeated field of another typemessageResponseTypeTwo {
repeatedMessageTypeTwofield=1;
}
messageMessageTypeOne {
int32id=1;
}
messageMessageTypeTwo {
int32id=1;
}
I'm pretty sure this only happens in cases where the field is named field, and it's repeated. But it's possible I've confused myself with some detail of this during looking into this.
I can get this to eval by type hinting both the method name and the integer param:
(clojure.core/deftypetransient_example_Example__ResponseTypeOne
[pojo2369 editable?]
example.Example$ResponseTypeOneOrBuilder
(^example.Example$MessageTypeOne getField ;;added return type hint on method symbol
[this__2302__auto__ ^int G__44449] ;;added type hint to int arg
(. pojo2369 getField G__44449)))
I'm not immediately sure how to fit this into the pronto code generation though. I might take a shot at it later in the week, but wanted to report this first
The text was updated successfully, but these errors were encountered:
Actually I realized there was some commented out code that seemed somewhat related to this. I had to tweak it slightly to add type hints to all args instead of non-integer args, but after doing that I was able to fix my issue in the example above, and it also didn't break anything in the relatively large real project I'm working on.
There might still be some issues with this, and it could possibly break other things. I'm not fully sure what I'm doing. But feedback is welcome and I can do a PR on request.
If I use java classes generated from this proto file:
Then try to define a mapper for one of the types:
I get:
I'm pretty sure this only happens in cases where the field is named
field
, and it's repeated. But it's possible I've confused myself with some detail of this during looking into this.The relevant java setter is this:
This seems to stem from this code (and similar other excerpts) from macroexpanding that defmapper call:
I can get this to eval by type hinting both the method name and the integer param:
I'm not immediately sure how to fit this into the pronto code generation though. I might take a shot at it later in the week, but wanted to report this first
The text was updated successfully, but these errors were encountered: