tigeba / mod-guice

Google Guice integraton for Vert.x
Other
11 stars 5 forks source link

Only works for Java #1

Open bytor99999 opened 10 years ago

bytor99999 commented 10 years ago

Our Module is a Groovy Vert.x module, so when we try to extend from your package we get tons of errors saying that it can't convert between the java EventBus and the groovy EventBus.

This makes mod-guide only usable if you are writing Java Verticles.

bytor99999 commented 10 years ago

It looks like the only solution is to do what Vert.x does in the groovy-lang module, which is just provide Groovy wrappers around your classes. Or you could make a mod-guide-groovy module.

Thanks

tigeba commented 10 years ago

Let me take a look at what they are doing in groovy-lang and also talk to the vertx folks about what would be the best way to provide language adapters for other vertx languages.

bytor99999 commented 10 years ago

Thanks. In our case, we just had to bring in the 5 classes into our code-base and change them to Goorvy. It is pretty easy for us.

tigeba commented 10 years ago

Just out of curiosity, does the GuiceVerticleHelper.inject() version work? It seems like it should.

bytor99999 commented 10 years ago

No because it imports the java versions of Vert.x

import org.vertx.java.core.Vertx; import org.vertx.java.platform.Container; import org.vertx.java.platform.Verticle;

Which means that in

public static void inject(Verticle verticle, Vertx vertx, Container container) {

We would be passing in the Groovy version of those classes and the code is expecting the Java versions