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

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