Giter Site home page Giter Site logo

Upgrade to a modern thrift about scrooge HOT 20 CLOSED

twitter avatar twitter commented on May 22, 2024 1
Upgrade to a modern thrift

from scrooge.

Comments (20)

mosesn avatar mosesn commented on May 22, 2024 12

We've finally scheduled this. Should hopefully happen in the next few months.

from scrooge.

yufangong avatar yufangong commented on May 22, 2024 3

@muuki88 yeah, this already already merged as of in 997f246. And this is standard libthrift, not a twitter forked one!

from scrooge.

yufangong avatar yufangong commented on May 22, 2024 2

Hi, we upgraded libthrift to 0.10.0, it should solve this issue. If that is not the case please open another issue. Thank you.

from scrooge.

kmonkeyjam avatar kmonkeyjam commented on May 22, 2024

Unfortunately, the java that scrooge is currently generating is a fork off of thrift 0.5.0 (that adds in finagle support).

from scrooge.

dsiegel avatar dsiegel commented on May 22, 2024

That makes sense, but scrooge appears to depend on libthrift 0.8.0.

scrooge-core and scrooge-maven-demo both depend on libthrift 0.8.0.
The docs say to use thrift 0.8.0.

Is that because the scala depends on libthrift 0.8.0 while the java code depends on the thrift 0.5. fork?

from scrooge.

stoweesh avatar stoweesh commented on May 22, 2024

Same issue here. Any ideas how to fix the dependencies ?

from scrooge.

stoweesh avatar stoweesh commented on May 22, 2024

Looks like I've found a temporary solution. You have to use version 3.0.9 of scrooge-maven-plugin and scrooge-runtime. All other combinations will not work. The documentation here http://twitter.github.io/scrooge/MVNPlugin.html is also incorrect.

from scrooge.

plaflamme avatar plaflamme commented on May 22, 2024

Which version of libthrift is compatible with the generated code? It is stated that it is a fork of 0.5.0, but is it available anywhere? I recently found that scrooge was horribly broken when trying to use it from a Java project (even after carefully following the documentation).

I'd suggest upgrading the Java generation to the proper libthrift version and rename the exiting one to something else e.g.: java-0.5 People that need the old version can simply change the language name and everyone else that starts a new project will see that scrooge works as advertised...

from scrooge.

frenchfrywpepper avatar frenchfrywpepper commented on May 22, 2024

This seems to still be an issue. I've tried using 3.0.9 of the scrooge-maven-plugin but I can't seem to find the option to generate java code from that version of the plugin.

It would be better to get the latest version of scrooge generator to generate thrift8 compliant java code. If nobody knows of any progress on that front I may look to submit a pull request for this issue.

from scrooge.

stoweesh avatar stoweesh commented on May 22, 2024

Guys, any updates on this ? The issue makes scrooge completely unusable in java projects.

from scrooge.

eirslett avatar eirslett commented on May 22, 2024

Try setting <language>java-experimental</language>? I think something like that exists in Scrooge, to generate 0.9-compatible files.

from scrooge.

sprsquish avatar sprsquish commented on May 22, 2024

The java generator currently generates code that exactly matches what the thrift 0.5.0 generator produces. This was a requirement internally so we could move all projects to scrooge. Over time we will upgrade our version internally and modify scrooge accordingly. Until we start on that, supporting later versions of libthrift with the java generator is not a priority.

As with anything open source, we're happy to take contributions.

from scrooge.

bzz avatar bzz commented on May 22, 2024

@sprsquish Is this still an issue: am I right that scrooge 3.17.0 with "experimental-java" still generates only libthrift 0.5 compatible code?

If that's true, that pretty much might be worth documenting somewhere to save people's time who try to follow Thrift 0.9 http://thrift.apache.org/tutorial/java with scrooge

from scrooge.

eirslett avatar eirslett commented on May 22, 2024

experimental-java generates code for Thrift 0.9.
But it still doesn't cover all edge cases, like struct constants.

from scrooge.

codefromthecrypt avatar codefromthecrypt commented on May 22, 2024

Using the maven plugin, I can't seem to get a $FinagleClient inner class to generate.

Has the 'experimental-java' language with --finagle option been tested, lately. Simply switching the language to scala with the following mojo generates the $FinagleClient fine in scala.

<plugin>
    <groupId>com.twitter</groupId>
    <artifactId>scrooge-maven-plugin</artifactId>
    <!-- 3.17.0 is busted per #184 -->
    <version>3.16.0</version>
    <configuration>
        <!-- experimental-java doesn't generate the $FinagleClient inner class -->
        <language>scala</language>
        <thriftOpts>
            <thriftOpt>--finagle</thriftOpt>
        </thriftOpts>
    </configuration>
    <executions>
        <execution>
            <id>thrift-sources</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
    </executions>
</plugin>

from scrooge.

diguage avatar diguage commented on May 22, 2024

Setting experimental-java, it can generate 0.9-compatible files.

The document should indicate it.

from scrooge.

benjumanji avatar benjumanji commented on May 22, 2024

@adriancole #182 (it's not immediately obvious that it is talking about the same thing but it was created off the back of this conversation https://groups.google.com/forum/#!topic/finaglers/Q4iVxsJ2rVA)

from scrooge.

mosesn avatar mosesn commented on May 22, 2024

We would like to update to a modern thrift version, but it's going to be a larger effort internally.

from scrooge.

muuki88 avatar muuki88 commented on May 22, 2024

This was never an issue with Scala, right?

from scrooge.

muuki88 avatar muuki88 commented on May 22, 2024

Awesome 🤩

This will be included in the next 18.4 release?
And is it the standard libthrift or an adapted Twitter version?

from scrooge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.