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
Conjure objects validate primitive fields and non-primitive fields separately. The primitives are validated in the builder before the constructor is called, and the non-primitives are validated in the constructor. When creating an object without specifying all the fields, an exception will be thrown about the missing primitive fields. After fixing those, an exception will be thrown about the missing non-primitive fields.
What did you want to happen?
I'd like to know about all the missing fields at the same time.
The text was updated successfully, but these errors were encountered:
I agree with your assessment that all validation should occur at the same time. If memory serves, early versions of conjure didn’t validate primitives at all and ended up using their java default values rather than failing, so I can understand why the code might not be as consistent as we’d like.
have you considered opting into staged builders? It’s an abi break for existing apis, however we have rolled out automation to reorder call sites so that a recompile is sufficient in most cases. It’s certainly preferred for new modules because the type system handles validation for us at build time rather than failing at runtime.
What happened?
Conjure objects validate primitive fields and non-primitive fields separately. The primitives are validated in the builder before the constructor is called, and the non-primitives are validated in the constructor. When creating an object without specifying all the fields, an exception will be thrown about the missing primitive fields. After fixing those, an exception will be thrown about the missing non-primitive fields.
What did you want to happen?
I'd like to know about all the missing fields at the same time.
The text was updated successfully, but these errors were encountered: