Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Thrift parser/generator
Scala Java HTML Thrift Shell

csl: Publish externally with pants, sbt, and friends

Problem

It's difficult to publish util, finagle, etc. because we haven't
updated them for the new maven-less world.

Solution

Scripts that make it easy to publish with sbt and pants.  Bumped
the server-set version because we stopped publishing thrift
externally in ci.  Changed an ExitGuard test which broke under
weird sbt conditions.

Result

We're in a position where we can start publishing finagle, etc
again!

RB_ID=633570
latest commit 0f631ea632
@mosesn mosesn authored jenkins committed
Failed to load latest commit information.
bin [split] scrooge: Cache parsed documents for performance.
demos/scrooge-maven-demo/src Remove references to c.t.f.builder.Server.localAddress
doc/src/sphinx scrooge-maven-plugin: Change Maven Scrooge Plugin to consume idls pu…
project csl: Publish externally with pants, sbt, and friends
scrooge-benchmark/src/main #169
scrooge-core scrooge: Assorted cleanups to generated code
scrooge-generator scrooge: Add maxThriftBuffer parameter for inherited services
scrooge-linter scrooge-linter: enforce doc on persisted structs
scrooge-maven-plugin scrooge-maven-plugin: Change Maven Scrooge Plugin to consume idls pu…
scrooge-ostrich birdcage: Split out 3rdparty deps to be opened
scrooge-runtime scrooge: Style cleanup and litany of other small changes
scrooge-sbt-plugin scrooge: Upgrade sbt plugin to be an auto plugin
scrooge-serializer birdcage: Split out 3rdparty deps to be opened
.gitignore [split] scrooge: Cache mustache resources to improve generation perfo…
.travis.yml Fix problems with SBT and Travis CI builds, update Scala and SBT vers…
CHANGES csl: Publish externally with pants, sbt, and friends
CONFIG.ini [split] improve SocialGraphUtil exception logging
GROUPS [split] improve SocialGraphUtil exception logging
LICENSE [split] improve SocialGraphUtil exception logging
OWNERS goodbye jeff (?????????`???)
README.md scrooge: Style cleanup and litany of other small changes
pushsite.bash [split] improve SocialGraphUtil exception logging
sbt [split] scrooge: Fix travis build.

README.md

Scrooge

Build Status

Scrooge is a thrift code generator written in Scala, which currently generates code for Scala and Java.

It's meant to be a replacement for the apache thrift code generator, and generates conforming, compatible binary codecs by building on top of libthrift.

Since Scala is API-compatible with Java, you can use the apache thrift code generator to generate Java files and use them from within Scala, but the generated code uses Java collections and mutable "bean" classes, causing some annoying boilerplate conversions to be hand-written. This is an attempt to bypass the problem by generating Scala code directly. It also uses Scala syntax so the generated code is much more compact.

There is a fairly comprehensive set of unit tests, which actually generate code, compile it, and execute it to verify expectations.

Quick-start

There are a couple of classes needed by the generated code. These have been moved out of scrooge into a separate jar to keep dependencies small. Maven users need to add the following to the pom.xml file:

<dependency>
  <groupId>com.twitter</groupId>
  <artifactId>scrooge-core_2.9.2</artifactId>
  <version>3.3.2</version>
</dependency>

SBT users need this:

val scroogeCore = "com.twitter" %% "scrooge-core" % "3.3.2"

Building the develop branch locally

You will need the develop branches of util, ostrich, and finagle. Then ./sbt publish-local for each of them.

Full Documentation

https://twitter.github.io/scrooge/

Something went wrong with that request. Please try again.