In a project using scalapb-validate-codegen 0.2.2 and a scalapb-generated library of common message types that was NOT built with scalapb-validate-codegen, I'm seeing inconsistent behavior w.r.t. the generated validators attempting to do nested message validation.
For this message
message NestedValidate {
google.protobuf.StringValue foo = 1;
google.protobuf.Duration dur = 2;
com.livongo.protobuf.common.types.Date date = 3;
}
the generated validator for NestedValidate attempts to use the non-existent validator for date -- but not for foo or dur -- and so doesn't compile. All 3 of those types are provided by the same scalapb-generated library dependency.
object NestedValidateValidator extends scalapb.validate.Validator[example.myapp.helloworld.grpc.NestedValidate] {
def validate(input: example.myapp.helloworld.grpc.NestedValidate): scalapb.validate.Result =
scalapb.validate.Result.optional(input.date) { _value =>
com.livongo.protobuf.common.types.DateValidator.validate(_value)
}
}
Suggestions on what might be causing this and how to prevent?
thx,
Chris