Scrooge v22.12.0 Release Notes
Release Date: 2022-12-26 // over 3 years ago-
22.12.0
๐ New Features
- scrooge-core: c.t.scrooge.StructBuilder.forStructClass API for retrieving
๐ the StructBuilder for a struct or union class that helps in building ThriftStruct.PHAB_ID=D934277
๐ฅ Breaking API Changes
- scrooge-generator: c.t.scrooge.ast.Field.hasValidationAnnotation field can no longer
be set in the constructor, but it is now a property derived from the value in the
Field.fieldAnnotations field; if any annotations have a name starting with validation.
it is set to true, otherwise it is false.PHAB_ID=D912077
โ Runtime Behavior Changes
- ๐ scrooge-generator: Move ServerValidationMixin trait to be in the companion object of the service, this is to
avoid ambiguities when calling the trait from inherited services.PHAB_ID=D943975 - scrooge-thrift-validation: custom annotations in ThriftValidator must have a
name starting with validation.PHAB_ID=D912077 - scrooge-generator: Checks for reference equality in Scala structs before iterating over the fields, this is to
โฌ๏ธ reduce the cost of equals checks on large structs (many fields or deeply nested fields).PHAB_ID=D950010 - ๐ scrooge: Use the util-mock for testing which depends on the 3.12.4 "org.mockito", remove the
"org.jmock" dependencies. 967d7ddf - 0๏ธโฃ scrooge: c.t.scrooge.StructBuilder now accepts null values for non-primitive default-required fields. e35e1842
- scrooge-core: c.t.scrooge.StructBuilder.forStructClass API for retrieving
Previous changes from v22.7.0
-
22.7.0
๐ New Features
- scrooge-generator: Introduce a AnnotatedFieldType to abstract type annotations from
FieldType definitions. Currently used to propagate thrift annotations inside of
collection types. 59e91e64 2fa68351 - scrooge-core: c.t.scrooge.ThriftUnion.fieldInfoForUnionClass API for retrieving
ThriftStructFieldInfo for a ThriftUnion member class without having to instantiate
it. 19809c22 - scrooge-generator: Add @.generated annotation to Swift generated code 8fd6a089
- scrooge-generator: Provide a $STRUCT#unsetFields method to allow bulk unsets aef5029b
- ๐ scrooge-generator: support thrift validations on nested fields that are struct, union, and
๐ป exception 8bad4dd7
- scrooge-generator: Introduce a AnnotatedFieldType to abstract type annotations from