HelloWorld example error.

5 views
Skip to first unread message

kenmaz

unread,
Nov 13, 2009, 12:40:33 PM11/13/09
to Noop
Hi.
I build noop source code and I try to run HelloWorld example in
interpreter/target/resources/helloworld.
But, following errors was occured.

==============
% export CP=core/target/noop-core-0.1.0-SNAPSHOT.jar:
% export CP=$CP:interpreter/target/classes
% export CP=$CP:/Users/ken/.m2/repository/com/google/inject/guice/2.0/
guice-2.0.jar
% export CP=$CP:/Users/ken/.m2/repository/aopalliance/aopalliance/1.0/
aopalliance-1.0.jar
% export CP=$CP:/Users/ken/.m2/repository/org/antlr/antlr-runtime/
3.1.1/antlr-runtime-3.1.1.jar
% export CP=$CP:/Users/ken/.m2/repository/org/antlr/antlr/3.1.1/
antlr-3.1.1.jar
%
% scala -cp $CP noop.interpreter.InterpreterMain HelloWorld
interpreter/target/resources/stdlib interpreter/target/resources/
helloworld

com.google.inject.CreationException: Guice creation errors:

1) No implementation for noop.types.BooleanFactory was bound.
while locating noop.types.BooleanFactory
for parameter 2 at noop.interpreter.InterpreterVisitor.<init>
(InterpreterVisitor.scala:34)
at noop.interpreter.InterpreterModule.getVisitor
(InterpreterModule.scala:51)

2) No implementation for noop.types.IntegerFactory was bound.
while locating noop.types.IntegerFactory
for parameter 4 at noop.interpreter.InterpreterVisitor.<init>
(InterpreterVisitor.scala:34)
at noop.interpreter.InterpreterModule.getVisitor
(InterpreterModule.scala:51)

3) No implementation for noop.types.StringFactory was bound.
while locating noop.types.StringFactory
for parameter 3 at noop.interpreter.InterpreterVisitor.<init>
(InterpreterVisitor.scala:34)
at noop.interpreter.InterpreterModule.getVisitor
(InterpreterModule.scala:51)

3 errors
at
com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist
(Errors.java:354)
at com.google.inject.InjectorBuilder.initializeStatically
(InjectorBuilder.java:152)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at com.google.inject.Guice.createInjector(Guice.java:92)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at noop.interpreter.InterpreterMain$.main(InterpreterMain.scala:37)
at noop.interpreter.InterpreterMain.main(InterpreterMain.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.ObjectRunner$$anonfun$run$1.apply
(ObjectRunner.scala:75)
at scala.tools.nsc.ObjectRunner$.withContextClassLoader
(ObjectRunner.scala:49)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:74)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:
154)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
==============

My Environment is following.

=============
-Mac OS X
% java -
version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-226)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-92, mixed mode)
% scala -
version
Scala code runner version 2.7.7.final -- Copyright 2002-2009, LAMP/
EPFL
% ruby -
v
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
============

What is wrong ?

Christian Edward Gruber

unread,
Nov 13, 2009, 1:04:27 PM11/13/09
to no...@googlegroups.com, Alex Eagle
Heh. So some new code has gone into the interpreter recently to
enable a Guice-backend for the noop injection semantics, but
unfortunately it's not fully baked yet. Sorry. Let's bag on Alex
until he gets it working. :)

Seriously, though, should be soon. The code only went in a day or two
ago, and I'm not sure that the interpreter guys have run through all
the example code yet with the new changes.

Christian

Alex Eagle

unread,
Nov 13, 2009, 1:11:08 PM11/13/09
to no...@googlegroups.com

I broke it on Nov 9

http://code.google.com/p/noop/source/detail?r=e7c793f6d6617be272e50d6a7169fa7ef325e38e

Looks like we need a system test for our main, which is the only untested code right now.

Fix underway - thanks for catching it!

Also, you had to slog through some classpath setting, due to missing dependencies in the noop-interpreter jar. That's because we have a TODO to map the extra jars to an internal package namespace to avoid collisions. I'll work on that sooner now that I know someone is running the interpreter!

-Alex

Christian Edward Gruber

unread,
Nov 13, 2009, 8:18:00 PM11/13/09
to no...@googlegroups.com
Of course, if we were writing noop in noop, it would be even easier to test it... ;-)

Christian.

kenmaz

unread,
Nov 13, 2009, 9:41:47 PM11/13/09
to Noop
Thank you for reply.

I understand why example code could not run.
I update to revision 132 and it works !!

By the way, many japanases are intereted in Go programming language.
But I like Noop better than Go. :)

On Nov 14, 10:18 am, Christian Edward Gruber
<christianedwardgru...@gmail.com> wrote:
> Of course, if we were writing noop in noop, it would be even easier to  
> test it... ;-)
>
> Christian.
>
> On Nov 13, 2009, at 1:11 PM, Alex Eagle wrote:
>
> > I broke it on Nov 9
>
> >http://code.google.com/p/noop/source/detail?r=e7c793f6d6617be272e50d6...
>
> > Looks like we need a system test for our main, which is the only  
> > untested code right now.
>
> > Fix underway - thanks for catching it!
>
> > Also, you had to slog through some classpath setting, due to missing  
> > dependencies in the noop-interpreter jar. That's because we have a  
> > TODO to map the extra jars to an internal package namespace to avoid  
> > collisions. I'll work on that sooner now that I know someone is  
> > running the interpreter!
>
> > -Alex
>
> > On Fri, Nov 13, 2009 at 9:40 AM, kenmaz <kentaro.matsu...@gmail.com>  

Alex Eagle

unread,
Nov 13, 2009, 10:12:39 PM11/13/09
to no...@googlegroups.com
Glad to hear it! You should reserve some judgment until we support more than Hello World, but it's great to know you're out there building and running the code!
-Alex
Reply all
Reply to author
Forward
0 new messages