Skip to content

Releases: twitter/scrooge

Scrooge 22.12.0

26 Dec 14:40
Compare
Choose a tag to compare

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
  • scrooge: c.t.scrooge.StructBuilder now accepts null values for non-primitive default-required fields. e35e1842

Scrooge 22.7.0

28 Jul 21:23
Compare
Choose a tag to compare

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 22.4.0

20 Apr 16:32
Compare
Choose a tag to compare

22.4.0

No Changes

Scrooge 22.3.0

29 Mar 21:54
Compare
Choose a tag to compare

22.3.0

New Features

  • scrooge-generator: for each method defined in a service in the Thrift IDL, if any request arg
    of a method has annotations started with validation., in Java template, generate a new trait
    ServerValidationMixin with a new API violationReturning<method_name> which validates incoming
    request (of Struct, Union, Exception types) and return any violations (as method parameters
    <request_variable>Violations) back to the users in the method API. aab91465

Breaking API Changes

  • scrooge: ThriftUnion is now defined to extend ThriftStruct. In practice,
    this is not a significant change as all Scrooge-generated classes that
    implement ThriftUnion also implement ThriftStruct. We just made the
    invariant that unions are always structs explicit in the type system.
    34ed2ec3

Runtime Behavior Changes

  • scrooge: Bump version of Jackson to 2.13.2. b283d341

Scrooge 22.2.0

04 Mar 16:10
Compare
Choose a tag to compare

22.2.0

New Features

  • scrooge-core: c.t.scrooge.ThriftStructCodec.forStructClassTag API for retrieving
    the codec for a struct or union class given a class tag or manifest and
    c.t.scrooge.ThriftStructMetadata.forStructClassTag for retrieving its metadata.
    ba1a97bc
  • scrooge-core: c.t.scrooge.ThriftStructCodec.forStructClass API for retrieving codec
    for a struct or union class and c.t.scrooge.ThriftStructMetadata.forStructClass for
    similarly retrieving its metadata. PHAB_ID=_D825675
  • scrooge-generator: for each method defined in a service in the Thrift IDL, if any request arg
    of a method has annotations started with validation., generate a new trait
    ServerValidationMixin with a new API violationReturning<method_name> which validates incoming
    request (of Struct, Union, Exception types) and return any violations (as method parameters
    <request_variable>Violations) back to the users in the method API. aa83a3f5

Breaking API Changes

  • scrooge-generator: the c.t.scrooge.frontend.ThriftParser now always throws exceptions
    rather than warnings when a fieldname matches a reserved keyword. See
    c.t.scrooge.frontend.ThriftKeywords for the full list of disallowed
    keywords. 33767856

Scrooge 22.1.0

18 Jan 20:32
Compare
Choose a tag to compare

22.1.0

No Changes

Scrooge 21.12.0

17 Dec 12:30
Compare
Choose a tag to compare

21.12.0

No Changes

Scrooge 21.11.0

24 Nov 22:31
Compare
Choose a tag to compare

21.11.0

Runtime Behavior Changes

  • scrooge-serializer: concrete implementations of the ThriftStructSerializer
    trait in the c.t.scrooge. package now cache the value of its maxReusableBufferSize
    flag for the duration of the application. This improves performance but also makes them
    not observe changes to the flag. The value of this flag typically does not change during
    run time of an application, so this is deemed an acceptable tradeoff. 064e1535

Scrooge 21.10.0

01 Nov 20:06
Compare
Choose a tag to compare

21.10.0

No Changes

Scrooge 21.9.0

01 Oct 20:50
Compare
Choose a tag to compare

Breaking API Changes

  • scrooge-generator: Dropped the generic (higher-kinded-types) service interface in scala-gen,
    users are recommended to use YourService.MethodPerEndpoint, YourService.ServicePerEndpoint
    and YourService.ReqRepServicePerEndpoint to represent Thrift service endpoints. Note,
    -finagle option is required to generated finagle binding code. 8d768ca6

  • scrooge-generator: Removed YourService.FutureIface and YourService[Future] in scala-gen,
    use $YourService.MethodPerEndpoint instead. Correspondingly, YourService$FinagleService and
    related constructors taking MethodPerEndpoint as parameters. 8d768ca6

  • Scrooge-generator: Dropped ThriftServiceBuilder.build and MethodIfaceBuilder.newMethodIface.
    8d768ca6

  • scrooge-generator: Add reserved keywords to ThriftParser. If your field names match
    these keywords, you may need to modify them. This change should not affect backwards
    and forwards compatiblility if using binary protocol for serde. 884f3603