fmgasparino / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

Current version of guice (guice-snapshot) is causing NoSuchMethodError in SourceWriteUtil.getSourceName #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Guice Revision: 1127
I'm getting error when I try to use latest Guice-snapshot with google gin. 

Here is the stack trace: 
 [java] java.lang.NoSuchMethodError:
com.google.inject.internal.MoreTypes.toString(Ljava/lang/reflect/Type;)Ljava/lan
g/String;
     [java]     at
com.google.gwt.inject.rebind.util.SourceWriteUtil.getSourceName(SourceWriteUtil.
java:389)
     [java]     at
com.google.gwt.inject.rebind.util.SourceWriteUtil.getSourceName(SourceWriteUtil.
java:361)
     [java]     at
com.google.gwt.inject.rebind.GinjectorOutputter.outputBindings(GinjectorOutputte
r.java:163)
     [java]     at
com.google.gwt.inject.rebind.GinjectorOutputter.output(GinjectorOutputter.java:1
48)
     [java]     at
com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorI
mpl.java:77)
     [java]     at
com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java
:47)
     [java]     at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:49)
     [java]     at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindO
racle.java:113)
     [java]     at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOrac
le.java:62)
     [java]     at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:1
72)
     [java]     at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:1
61)
     [java]     at
com.google.gwt.dev.Precompile$DistillerRebindPermutationOracle.getAllPossibleReb
indAnswers(Precompile.java:204)
     [java]     at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds
(WebModeCompilerFrontEnd.java:128)
     [java]     at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.process(AbstractCompiler.ja
va:151)
     [java]     at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
     [java]     at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile(AbstractCompiler.ja
va:85)
     [java]     at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile(AbstractCompiler.ja
va:181)
     [java]     at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.access$400(AbstractCompiler
.java:71)
     [java]     at
com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:473)
     [java]     at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(We
bModeCompilerFrontEnd.java:73)
     [java]     at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompi
ler.java:259)
     [java]     at
com.google.gwt.dev.Precompile.precompile(Precompile.java:300)
     [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:170)
     [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
     [java]     at
com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
     [java]     at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.
java:82)
     [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:131)

As it seems the following line:
return nameGenerator.binaryNameToSourceName(MoreTypes.toString(type));
is using MoreTypes.toString(type) which in the latest guice version is not
available.

Original issue reported on code.google.com by MGe...@gmail.com on 9 Nov 2009 at 1:36

GoogleCodeExporter commented 9 years ago
We will probably upgrade our supported Guice version at some point but for now, 
Guice
2.0 is what we work with. You're welcome to provide a patch that works with 
trunk and
Guice 2.0 though if you like.

Original comment by aragos on 9 Nov 2009 at 10:34

GoogleCodeExporter commented 9 years ago
Hello, 
 It had been long time since I posted this issue and At last I found time to fix it. 

 Patch, guice snapshot jar (rev 1131) and javax.inject.jar are attached to the comment.

Original comment by MGe...@gmail.com on 26 Nov 2009 at 1:20

Attachments:

GoogleCodeExporter commented 9 years ago
I'd rather not add a new dependency (javax.inject.jar) before the 1.0 release 
so I'll
mark this as blocked by release. Also, can you please follow the instructions on
http://code.google.com/p/google-gin/wiki/ContributingToGin? You need to file 
the CLA
and send the change for review before we can submit it.

Original comment by aragos on 1 Dec 2009 at 1:54

GoogleCodeExporter commented 9 years ago
Sure. Patch was sent for review: http://codereview.appspot.com/164055

Please let me know if you have some suggestions or questions.

Original comment by MGe...@gmail.com on 1 Dec 2009 at 5:29

GoogleCodeExporter commented 9 years ago
Note that post was not sent to the group "google-gin@googlegroups.com", cause 
I'm not
a currently member of it. 

"
We're writing to let you know that the group you tried to contact (google-gin) 
may
not exist, or you may not have permission to post messages to the group. A few 
more
details on why you weren't able to post:

 * You might have spelled or formatted the group name incorrectly.
 * The owner of the group may have removed this group.
 * You may need to join the group before receiving permission to post.
 * This group may not be open to posting.
"

If you want I could re-send it again after I join the group.

Original comment by MGe...@gmail.com on 1 Dec 2009 at 5:35

GoogleCodeExporter commented 9 years ago
Note that I still expect my CLA agreement.

Where do I have to upload it after I receive it ?  Here ? or as attachment at 
http://codereview.appspot.com ?

Original comment by MGe...@gmail.com on 1 Dec 2009 at 2:20

GoogleCodeExporter commented 9 years ago
Once the review is through (I'll try to get to it by the end of the week) and 
you
have your CLA done I can download the latest patch from the codereview site and 
then
use that. 

Don't worry about the one message that didn't get through to the list. :)

Original comment by aragos on 1 Dec 2009 at 7:06

GoogleCodeExporter commented 9 years ago
This is blocked by some bugs in Guice which I filed a patch for here:
http://code.google.com/p/google-guice/issues/detail?id=474

Original comment by aragos on 22 Apr 2010 at 1:59

GoogleCodeExporter commented 9 years ago
Fixed in r139.

Original comment by aragos on 7 Jul 2010 at 12:28