Fetching contributors…
Cannot retrieve contributors at this time
298 lines (261 sloc) 13.3 KB
3.1.1 - 04/16/2013
We finally made scrooge-runtime to be backward with Scrooge 2. This requires
a name change for the ThriftStructCodec. From now on, all objects generated
by Scrooge 3 will use ThriftStructCodec3.
This will affect you only if your code is using ThriftStructCodec directly,
which is not common.
* add language option tag to scrooge-maven-plugin, thanks to @eirslett
* some directory reorganization of the demos
3.1.0 - 04/11/2013
* Dependency changes: now on util/finagle 6.3.0
* demo project now shows how to construct finagle server and client using
generated code
* --ostrich flag implies --finagle flag
3.0.9 - 03/27/2013
* Remove "provided" scope of finagle in scrooge-runtime. So it brings Finagle
6.1.0 as transit dependency to your project
* Make the generated Scala code backward compatible with Finagle 5. The impact
to users on Finagle 6 is that you will see a lot of warnings saying that
tracerFactory is deprecated.
3.0.8 - 03/18/2013
* When scrooge-maven-plugin extracts Thrift files from a dependency artifact, it
now puts them in a sub folder named after the artifact id. This way, the user
project can use same-named Thrift files from different artifacts.
* Title case and camel case more consistent with previous version before 3.0.7
We still preserve consecutive upper cases but not in an all-up-case string, eg:
TBird (original) -> tBird (camel case) -> TBird (title case)
HTML (original) -> html (camel case) -> Html (title case)
Thanks to @erikvanoosten
* Finagle client can throw exception on void function. Thanks to @brancek
* Support documentation on enum values. Thanks to @erikvanoosten
* Reorganizing test folder, and add Apache standard test
3.0.7 - 03/07/2013
* All on-wire names in the Thrift messages are now consistent with
Apache generated code. This allows Scrooge generated services to exchange
Thrift messages with Apache generated services.
* Title case ids now preserve consecutive upper case letters. Eg:
TBird (original) -> Tbird (old) -> TBird (now)
See test case in scrooge-generator/src/test/scala/com/twitter/scrooge/ASTSpec.scala
* scrooge-maven-plugin now enforces an explicit white list in <dependencyConfig>.
The old behavior is that if a dependency artifact has a "idl" classifier, we
will extract thrift files from it to compile. The new behavior is that the
artifact must be explicitly included in <dependencyConfig>. The dependencies
here include both direct dependencies(specified in project pom file) and
indirect dependencies (everything in the dependency tree).
* Now supports "scala" as a namespace scope. It is treated same as "java".
* Now supports "*" as a default namespace scope
3.0.6 - 02/15/2013
* Released a scrooge-maven-plugin, for maven projects to integrate Scrooge in
their pom files. Also released a demo of how to use scrooge-maven-plugin
* scrooge-runtime is now backward compatible with scrooge-runtime 2.X.X. The
following classes and methods are deprecated:
* scrooge-runtime now can introspect generated ThriftStruct. See the new
ThriftStructMetaData class.
* BREAKING: in scrooge-runtime, com.twitter.ScroogeOption is now renamed to
just Option. This is mainly for Java code. But if you need to use it in
Scala code, make sure to address ambiguity with scala.Option.
* Updated APIs of scrooge-generator. See com.twitter.scrooge.Compiler class
* Fix the stats reporting for the java scrooge thrift code generation
3.0.5 - 02/04/2013
Bug fixes
* Constant definitions now can be of "set" type.
* Fix letter cases of enum fields(Java uses upper case; Scala uses title case)
* Remove dependency on org.scalatest, com.twitter.scalatest (not in Maven
* Update dependency of util/finagle/ostrich to 6.1.0
* Project dependencies are all in Maven Central now. You don't need to have
access to Twitter internal repository anymore.
3.0.4 - 01/27/2013
* add --dry-run option to parse and validate source thrift files, reports any
errors, but does not emit any generated source code. It can be used with
--gen-file-mapping to get the file mapping
Bug fixes
* union types now can contain primitive types.
* constants defined in the same file now can be referenced.
* Update dependency of util/finagle/ostrich to 6.0.6
3.0.3 - 12/21/2012
* Scrooge artifacts now deploys to Maven central via Sonatype
* Scrooge project builds in Travis CI
* Features
- Fully qualifying ids imported by "include" statements. We don't generate
"import" statements anymore.
- Remove unnecessary finagle jar dependencies for vanilla generated code.
* Add tests
- non-finagle usage; see NonFinagleSpec.scala
- struct immutability and deep copying; see ImmutableStructSpec.scala
* Bug fixes
- move "validate" method from Scala struct trait to object, so that the thrift
struct can define a "validate" field without name clashing.
3.0.2 - 11/16/2012
* Adding a "--gen-file-map <path>" option to Scrooge command line. It tells
what output files each input Thrift files generates, in the following format:
inputPath/input.thrift -> outputPath/Constants.scala
inputPath/input.thrift -> outputPath/FooStruct.scala
* The generated enums now have a common trait ThriftEnum(defined in
scrooge-runtime), that allows you to query the name as well as the value of
the enum field.
* The generated Scala enums now are Java-serializable.
* The generated FinagledClient class takes val arguments to make "service",
"protocol" accessible:
class FinagledClient(
val service: ...,
val protocol: ...,
val serviceName: ...
stats: ...
3.0.1 - 10/30/2012
Features and bug fixes
* Doc comments are included in the generated code.
* Generated exception structs now have getMessage() method
* Generate header that emits Scrooge version
* You can now import a directory or a Jar/Zip file through command line
argument, which will be stored in a chain of paths maintained by Scrooge.
Then refer to a file using relative path in the thrift "include" statement.
Scrooge will locate the file in the path chain.
* Introduce a "strict" mode that defaults to on. Unfavored syntax throws an
exception when "strict" mode is on and prints a warning when it's off. The
strict mode can be disabled by specifying the "--disable-strict" argument.
* The "oneway" modifier is treated as an OnewayNotSupportedException in strict
mode and a warning in non-strict mode.
* Support Union types. Given:
union Point {
1: double x
2: double y
3: Color color = BLUE
Scrooge generates:
sealed trait Point
object Point {
case class X(x: Double) extends Point
case class Y(y: Double) extends Point
case class Count(color: Color = Color.Blue) extends Point
The "required" and "optional" modifiers in a union type will throw
exceptions in strict mode and print warnings in non-strict mode.
* Have a common trait ThriftException for all the thrift exception structs.
* Support cross file service inheritance. Now you can do
include "foo.thrift"
service MyService extends foo.FooService { ... }
* Bug fix: It couldn't resolve a symbol imported through a relative path and
threw an UndefinedSymbolException
* Bug fix: namespace aliasing put the parentheses in the wrong place.
* Bug fix: services using binary fields wouldn't compile
* Bug fix: cross-file const referencing didn't work
Implementation updates
* Project structure:
- frontend: Importer and ThriftParser
- mustache: everything related to mustache, including template parser, loader
and handlebar
- ast: Thrift AST definition
- backend: code generation include various generators and dictionaries to
hydrate Mustache templates.
* Redefine clear and separate responsibilities of each components:
- Move ID manipulation(concatenation, case conversion, keyword rewriting etc)
to Generator phase.
- Utilizing Scala static type checking to enforce scoping correctness by
introducing SimpleID and QualifiedID to AST.
- Enforce dictionary key uniqueness for nested Mustache templates.
* Scrooge project is now on Maven
* Delete obsolete code and tests
* Upgraded to util 5.3.13, finagle 5.3.30
* Removed dependency on sbt
* Add dependency on maven
3.0.0 - 05/24/2012
* Java code generation is now supported!
* Scala code now generates a set of classes for each struct:
- a base trait
- an immutable case class (used as the default implementation)
- a proxy trait (to make it easy to build proxy classes)
* Moved scrooge-runtime into the same repo with scrooge, which is now called
scrooge-generator. Both projects will keep version numbers in sync now.
* Changed the way required/optional is treated on fields, and default values,
to more closely match the way Apache Thrift works. (This is described in
more detail in a new section of the README.)
* Fixed constant sets.
* Fixed thread safety in finagle ThriftServer.
* Fixed the resolution of #include directives that follow relative paths.
* Removed the finagle dependency from scrooge-runtime so that code generated
with scrooge can be loosely coupled with finagle, or optionally not depend
on finagle at all (if you don't build finagle bindings).
* Fixed typedef references that were relative to #included files.
* Made various improvements to the internal template system.
* Fixed test speed by using scrooge to generate code that the tests build
against, avoiding runtime evaluation.
* Upgraded to thrift 0.8.0, util 4.0, and finagle 4.0.
* Upgraded to sbt 0.11.2.
* Upgraded to scala 2.9.2.
2.5.4 - 03/19/2012
* Addressed an issue where structs with the same name but from different
namespaces/packages would conflict. Now using a package alias to
2.5.3 - 03/02/2012
* Minor bug fix for serviceName name class with.
2.4.0 - 01/03/2012
* added support for structs with more than 22 fields, which previously was the
limit as that is the max case-class size in scala. For structs larger than
this, instead of using case-classes, normal classes are used but with most of
the case-class boilerplate support code also generated, allowing these structs
to be used as if they were case-classes. The only exception is that there is
no unapply method; but do you really want to unapply 23+ fields in a match
2.3.1 - 11/28/2011
* thriftProtocolFactory in generated ThriftServer now has
type of TProtocolFactory, so you can override it with other
protocol factories.
2.3.0 - 11/24/2011
* You can now override serverBuilder in ThriftServer to provide
additional server configuration
* The protocol factory to the FinagledClient now has a default
value of TBinaryProtocol.Factory, which means you don't have
to specify it when using the default.
2.2.0 - 11/04/2011
* tracerFactory support in ThriftServer.
2.1.0 - 10/23/2011
* Support for tracing in server.
* fixes a bug in which namespace mapping was not applied
recursively to included documents.
* fixes a bug in which qualified service names from imported
thrift files were not resolved properly.
* fixes a bug with enum in which the first value was wrong.
1.1.1 - 8/24/2011
* scrooge-runtime-1.0.1
* Each thrift struct companion object now extends ThriftStructCodec
* Correctly resolving enum constants and Const values.
* Title-casing enum value names.
* Added support for namespace renaming from the command line.