Questions tagged [scrooge]

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

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, binary-compatible codecs by building on top of libthrift.

Features:

  • Generates native Scala thrift codecs
  • Generated code is templated using a mustache variant, making it easy to edit.
  • Finagle client/server adaptors can be optionally generated at the same time.
  • Has a plugable backend providing a dynamic way to add more generator targets.

Home page: http://twitter.github.io/scrooge/

26 questions
1
vote
1 answer

Is it possible to skip code generation for included thrift files in Scrooge?

The Scrooge SBT plugin has the option to include Thrift IDL files from library dependencies (jar files). Often these jar files already contain the generated sources. If I include a Thrift IDL, I don't want to generate these sources again. Otherwise…
reikje
  • 2,850
  • 2
  • 24
  • 44
1
vote
2 answers

How does publishing a "thrift repo" work with Scrooge and associated plugins?

Scrooge has both plugins for sbt and for maven. I am not really interested in the maven plugin. It would appear the sbt plugin has the ability to extract thrift files from a dependency artifact. See the scroogeThriftDependencies option here However…
jedesah
  • 2,983
  • 2
  • 17
  • 29
1
vote
1 answer

Error when generating thrift files contains Union using scrooge

I generate a thrift server with twitter's scrooge,all runs well, but if I include a union type in thrift file, the generating process fails: [error] Exception in thread "main" com.twitter.scrooge.ParseException: [13.1] failure: string matching regex…
DiveInto
  • 2,158
  • 3
  • 27
  • 50
1
vote
1 answer

How to specify thrift include folder in SBT?

I have a hard time setting the scroogeThriftIncludeFolders for Scrooge (https://github.com/twitter/scrooge). In my build.sbt I already use the default settings via com.twitter.scrooge.ScroogeSBT.newSettings How do I configure the…
Chris W.
  • 2,266
  • 20
  • 40
0
votes
0 answers

Scrooge-mcetherface got error, with infura but got error

i try to install scrooge-mcetherface, but still got error, agree this tools very old but i try to install latest version , Mythril version v0.23.10, python3 version 3.9.14, also i installed sudo apt-get install python-pip libssl-dev python3-dev…
0
votes
1 answer

How to properly instantiate a Thrift/Scrooge generated class in Scala

I would like to instantiate a crooge generated class (or trait, better said). Now since I can't instantiate a trait, I used a anonymous wrapper class to generate some test object I want to serealize: val err = new ClientError{} But I cannot set any…
olkoza
  • 715
  • 2
  • 17
  • 35
0
votes
2 answers

Create TBase objects from Thrift-generated classes in Scala

I have some Scala classes I generated with Thrift (Scrooge). Now I need to somehow instantiate those as TBase class, b/c the TSerializer class needs this as an input This is my approach: def createTestBinary(): String = { val proto = new…
olkoza
  • 715
  • 2
  • 17
  • 35
0
votes
2 answers

Deserialize binary Thrift message in Scala

I am trying to desrialize a binary message in Scala: val deserializer = new TDeserializer(new TBinaryProtocol.Factory()); try { val obj = deserializer.deserialize(new ClientError{}, input._2.toArray) Where ClientError is the trait…
olkoza
  • 715
  • 2
  • 17
  • 35
0
votes
1 answer

How to use thrift file generation interface class in Scrooge

Like this command thrift -r --gen py tutorial.thrift
Sakura
  • 11
  • 3
0
votes
1 answer

using scrooge in Play framework

when using Finagle you can place the thrift file in the directory src/main/thrift/, and when compiling it can generate thrift file automatically in the directory target/scala-2.10/src_managed/main/. How can the Play framework do the same thing…
hliu
  • 1,015
  • 8
  • 16
-1
votes
1 answer

when scrooge-mcetherface install in ubuntu, i got much more error,

i try to install scrooge-mcetherface, but i got more error, i also install latest mythril version and all require file but when i runing main directory ./scrooge (address) i got error File "/home/vip72/scrooge-mcetherface/./scrooge", line 7, in…
1
2