Comments (20)
We've finally scheduled this. Should hopefully happen in the next few months.
from scrooge.
@muuki88 yeah, this already already merged as of in 997f246. And this is standard libthrift, not a twitter forked one!
from scrooge.
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.
Unfortunately, the java that scrooge is currently generating is a fork off of thrift 0.5.0 (that adds in finagle support).
from scrooge.
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.
Same issue here. Any ideas how to fix the dependencies ?
from scrooge.
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.
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.
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.
Guys, any updates on this ? The issue makes scrooge completely unusable in java projects.
from scrooge.
Try setting <language>java-experimental</language>
? I think something like that exists in Scrooge, to generate 0.9-compatible files.
from scrooge.
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.
@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.
experimental-java generates code for Thrift 0.9.
But it still doesn't cover all edge cases, like struct constants.
from scrooge.
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.
Setting experimental-java, it can generate 0.9-compatible files.
The document should indicate it.
from scrooge.
@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.
We would like to update to a modern thrift version, but it's going to be a larger effort internally.
from scrooge.
This was never an issue with Scala, right?
from scrooge.
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)
- Support i8 type HOT 2
- scrooge-sbt-plugin fails to build
- Can 'passthrough_fields' be a private field if wanted when Scrooge generates codes (sbt plugin)? HOT 1
- building linter fails - util-logging_2.12:19.10.0-Snapshot not found in Maven repo HOT 3
- Generate traits decoupled from Thrift dependencies HOT 3
- Closing of finagle-thrift client with scrooge generated service HOT 2
- Scala 2.13 version deprecation warning HOT 1
- twitter.github.io/scrooge is missing HOT 2
- com.twitter.scrooge.ast.Field.default is not callable from Java
- Interested in adding support for typescript? HOT 3
- Unavoidable "[Importer$] Expected to find just 1 match" warnings in sbt sub-project builds HOT 6
- Feature Suggestion: Custom type adapters HOT 1
- MultiImporter warnings for duplicates due to root importer HOT 1
- Add configuration choice of getting an immutable type in code generation for `bytes` thrift type HOT 1
- Updating from Scala 2.12 -> 2.13: scala.collection.Seq changes HOT 12
- scrooge-generator: Update Apache Thrift `Processor.process` signature HOT 5
- Add option to generate higher-kinded-type service interface HOT 2
- Upgrading libthrift to a newer version, security vulnerabilities HOT 1
- Java code generated from thrift file lacks MethodPerEndpoint, ServicePerEndpointReq, and RepServicePerEndpoint APIs
- Scala 2.13 immutable-sequences?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrooge.