Skip to content

Releases: twitter/scrooge

Scrooge 18.5.0

08 May 21:27
Compare
Choose a tag to compare
  • scrooge-generator: Add support for construction_required fields in cocoa. 692a57ef

  • scrooge-generator: Add cocoa initializer for each field in union. 904f5981

  • scrooge-generator: Add support for empty struct in cocoa. 2c9dcde2

  • scrooge-generator: Fix setter bug for non-primitive type in cocoa. 04d654fc

  • scrooge-adaptive: Turn the scrooge-adaptive off as default in ScroogeRunner due to
    incompatibility with sbt > 1.0.2. 289dc650

Scrooge 18.4.0

10 Apr 23:24
Compare
Choose a tag to compare
  • scrooge-generator: Add support for construction_required fields. Add a validateNewInstance method
    to all generated scala companion objects. cbde3312

  • scrooge-core: Check for corruption in size meta field of container and throw
    an exception if size is found corrupted. 75392161

  • scrooge: Upgrade libthrift to 0.10.0. 997f2464

Scrooge 18.3.0

06 Mar 22:56
Compare
Choose a tag to compare
  • scrooge-generator: Add support for mutually recursive structs. 2a731bbc

Scrooge 18.2.0

06 Feb 03:45
Compare
Choose a tag to compare
  • scrooge-generator: Add asClosable method to ServicePerEndpoint and
    ReqRepServicePerEndpoint interfaces as well. 597864ac

  • scrooge-generator: Remove unused functionToService and serviceToFunction
    methods along with ServiceType and ReqRepServiceType type aliases in
    order to simplify code generation.

    NOTE: This functionality can be manually replicated by users if/when needed
    to convert between a Function1 and a Finagle Service. 2d25eb25

  • scrooge-generator: Scala generated client now has a asClosable method returns c.t.u.Closable,
    client now can be closed by calling client.asClosable.close. Note that asClosable won't be
    generated if it is also defined by the user. 1fa4f0c6

  • scrooge-generator: Renamed subclasses of com.twitter.scrooge.RichResponse:
    ProtocolExceptionResponse, SuccessfulResponse, and ThriftExceptionResponse.
    These case classes are for representing different response types and should be only
    used by the generated code. 2194e77d

Scrooge 18.1.0

18 Jan 01:12
Compare
Choose a tag to compare
  • scrooge-generator: Update c.t.fingale.thrit.service.MethodPerEndpointBuilder
    to build MethodPerEndpoint types. Add new ThriftServiceBuilder for
    building the higher-kinded form from a ServicePerEndpoint. Users should
    prefer using the MethodPerEndpointBuilder. PHAB_ID=D127538

  • scrooge-generator: Add more metadata to generated java objects PHAB_ID=D122997
    Includes:

    • struct and field annotations from the idl files
    • which fields have default values
    • which field values of TType.STRING are actually binary fields
  • scrooge: Add support for scrooge.Request and scrooge.Response
    types in generated ThriftMethod code. PHAB_ID=D122767

Scrooge 17.12.0

11 Dec 19:46
Compare
Choose a tag to compare
  • scrooge: Introduce scrooge.Request and scrooge.Response envelopes which
    are used in ReqRepServicePerEndpoint interfaces and associated code. The
    scrooge Request and Response allow for passing "header" information (via
    ThriftMux Message contexts) between clients and servers. For instance, a
    server can implement a ReqRepServicePerEndpoint, and set response headers
    along with a method response, e.g.,

    class MyService extends MyService.ReqRepServicePerEndpoint {
    
      def foo: Service[Request[Foo.Args], Response[Foo.SuccessType]] = {
        Service.mk[Request[Foo.Args], Response[Foo.SuccessType]] { request: Request[Foo.Args] =>
          val result = ... // computations
          Future
            .value(
              Response(
                headers = Map("myservice.foo.header" -> Seq(Buf.Utf8("value1"))),
                result)
        }
      }
    }
    

    This ServicePerEndpoint can then be served using ThriftMux:

    ThriftMux.server.serveIface(":9999", new MyService().toThriftService)
    

    These response headers will be transported as Mux#contexts to the client. If
    the client is using the client-side ReqRepServicePerEndpoint it will be able
    to read the headers from the returned Response directly. E.g.,

    val client = ThriftMux.client.reqRepServicePerEndpoint[MyService.ReqRepServicePerEndpoint]
    
    val response: Response[Foo.SuccessType] = Await.result(client.foo(..))
    
    if (response.headers.contains("myservice.foo.header")) {
      ...
    

    Users can also choose to wrap the ReqRepServicePerEndpoint with a MethodPerEndpoint
    via ThriftMux.client.reqRepMethodPerEndpoint(reqRepServicePerEndpoint) in order to
    deal with methods instead of services. See the scrooge documentation for more information.
    aa1fb0c0

Scrooge 17.11.0

17 Nov 17:02
Compare
Choose a tag to compare
  • scrooge-generator: Deprecated some scala generated classes and use new ones
    FutureIface -> MethodPerEndpoint,
    MethodIface -> MethodPerEndpoint.apply(),
    MethodIfaceBuilder -> MethodPerEndpointBuilder,
    BaseServiceIface -> ServicePerEndpoint,
    ServiceIface -> ServicePerEndpoint,
    ServiceIfaceBuilder -> ServicePerEndpointBuilder.
    To construct a client use c.t.f.ThriftRichClient.servicePerEndpoint instead of
    newServiceIface, to convert ServicePerEndpoint to MethodPerEndpoint use
    c.t.f.ThriftRichClient.methodPerEndpoint instead of newMethodIface. 26f86b2b

  • scrooge-generator: (BREAKING API CHANGE) Change the java generator to no longer
    generate files with org.slf4j imports and remove limited usage of org.slf4j
    Logger in generated services. bf5364be

Scrooge 17.10.0

27 Oct 22:17
Compare
Choose a tag to compare
  • From now on, release versions will be based on release date in the format of
    YY.MM.x where x is a patch number. 2645da60

  • scrooge-generator: For generated scala $FinagleService, moved per-endpoint statsFilter to the
    outermost of filter chain so it can capture all exceptions, added per-endpoint response
    classification in statsFilter. 853323dc

  • scrooge-generator: Generated scala $FinagleClient takes a RichClientParam for all
    configuration params, such as TProtocolFactory, ResponseClassifier, maxReusableBufferSize,
    and StatsReceiver, $FinagleService takes a RichServerParam. 8bdf36cb

Scrooge 4.20.0

06 Sep 21:56
Compare
Choose a tag to compare

Updated dependencies to Finagle 7.1.0 and Util 7.1.0

Scrooge 4.19.0

17 Aug 18:23
Compare
Choose a tag to compare
  • scrooge-generator: Generated scala/java code now is using serviceMap instead of functionMap
    for Finagle services' method implementation. PHAB_ID=D73619 for scala and
    PHAB_ID=D76129 for java

  • scrooge-generator: Generated Java code now is using c.t.s.TReusableBuffer to reduce
    object allocations. This in turn adds scrooge-core as dependency for generated
    java code. PHAB_ID=D60406

  • scrooge-generator: Support for thrift struct field doccomments for scala
    generated code RB_ID=918179

  • scrooge-generator: The MethodIface in generated Scala code implements
    FutureIface. It already "was" that type in practice but did not implement
    that trait. PHAB_ID=D67289

  • scrooge-generator: Generated Cocoa code now supports modular frameworks and
    removes some compiler warnings about implicit casts. PHAB_ID=D74200