-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum Strings are no longer supported #575
Comments
I see that there are valid uses for this. This would, however, affect performance in that it adds additional assertions to the constructor that are potentially (especially internally) unnecessary. What about adding something like |
However, I would like to avoid that unless the performance regresses significantly. I am looking at the large code base and any place where we will make things optional will create opportunities for error. |
For context: This is what it currently does, which is as minimal as possible. With enums as strings, however, we'd have to check if 1. a key references a field, 2. field type is enum, 3. the value is a string and 4. whether there is a valid value for that string - 1/2 for pretty much every field, 3/4 for every enum field. |
yeah bummer, MyMessage.from with options would be the way to go. I will have to train folks not to use that and use something like protoUtils.from() which keeps our code base specific options. |
…ded Message/Type.from + test case, see #575
Message/Type.from is now in, give it a try! |
Perfect! tested on an example, works great. Haven't been able to start migration due to missing protos #576 |
Closing this for now. Feel free to reopen the issue if there are any issues! |
In V5 the ctor would either support string value or int value of an enum. in 6.2.1 string value is not supported when parsing from JSON. Would love to get that functionality back
does not work.
The text was updated successfully, but these errors were encountered: