-
Notifications
You must be signed in to change notification settings - Fork 21
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
Deserialization should not rely on classes with constructors having large parameter counts #390
Comments
I'm curious, what was the error? |
Hmm
looks like unexpected parameter 'indexDocument' on parameter-less constructor |
Converter::tryConvertObjectInner
errors when calling jumbo constructors
I've added jumbo custom type support to the SDK, it is already quite big (because of codegened test) |
I assume we don't want to break current providers, so I plan to remove the constructor-based code, after we release both the new codegen and regenerate all of the (affected) providers. As a result, I plan to do as follows, in 4 stages:
There might be some additional cleanup needed in the codegen, after removal of the old mechanism, I'm not super familiar with this part of the codebase, but I anticipate this eventuality. |
Interesting.
|
Let's create a follow-up issue (s) for cleanup issues, and consider this done. |
Hello!
Issue details
Deserialization should not rely on classes with constructors having large parameter counts.
Code generation for Java SDK classes that need to be deserialized from protobuf currently relies on constructors with many parameters (one per desired property) internally. This breaks down when it hits hard limits on Java parameter counts.
Earlier when we worked around the problem of not being able to compile providers with large parameter counts, we introduced a special pathway in the SDK code generator for the special case of "jumbo" constructors. This does not completely solve the problem however. While you can construct these Jumbo objects, tryConvertObjectInner errors when facing them.
Desired complete fix would:
Converter::tryConvertObjectInner
errors when calling jumbo constructors" found earlierAffected area/feature
The text was updated successfully, but these errors were encountered: