Compilation erros

134 views
Skip to first unread message

Richard Apodaca

unread,
Nov 28, 2011, 12:30:42 AM11/28/11
to s2...@googlegroups.com
I've just stumbled on the S2JS project and am very excited to give it a spin. Unfortunately, I'm hitting some problems in building the project jarfile. I'd like to use S2JS within Eclipse, as in this video:


I know next to nothing about Scala, but here's what I've done:

1) Installed SBT 0.10.0 on OS X using MacPorts
3) cd s2js
4) $ sbt
[info] Loading project definition from /Users/rich/tmp/s2js/project
[info] Set current project to default-14965e (in build file:/Users/rich/tmp/s2js/)
5) > compile

Unfortunately, I get many errors, starting with these:

[info] Compiling 31 Scala sources to /Users/rich/tmp/s2js/target/scala-2.9.1/classes...
[error] /Users/rich/tmp/s2js/src/main/scala/com/gravitydev/s2js/S2JSComponent.scala:5: object tools is not a member of package scala
[error] import scala.tools.nsc.plugins.PluginComponent
[error]              ^
[error] /Users/rich/tmp/s2js/src/main/scala/com/gravitydev/s2js/S2JSComponent.scala:4: object tools is not a member of package scala
[error] import scala.tools.nsc.symtab.Symbols
[error]              ^
[error] /Users/rich/tmp/s2js/src/main/scala/com/gravitydev/s2js/S2JSComponent.scala:3: object tools is not a member of package scala
[error] import scala.tools.nsc.{Global, Phase}
[error]              ^
[error] /Users/rich/tmp/s2js/src/main/scala/com/gravitydev/s2js/S2JSPlugin.scala:4: object tools is not a member of package scala
[error] import scala.tools.nsc.plugins.{Plugin, PluginComponent}

Many other compile errors follow.

Any ideas what I could be doing wrong?

Thanks,
Rich

Richard Apodaca

unread,
Nov 28, 2011, 8:42:36 PM11/28/11
to S2JS
I was able to solve the problem by uninstalling sbt and re-installing
sbt 0.7.4 manually as described here:

http://code.google.com/p/simple-build-tool/wiki/Setup

After deleting my ~/.sbt directory, I changed into a just-cloned s2js
directory and did:

$ sbt

This worked without errors. Then using:

> package

created the jarfile needed for Eclipse in:

target/scala_2.9.0/s2js_2.0.0-1-SNAPSHOT.jar

I now have s2js installed in Eclipse and am testing things with a
sample project. It works great. s2js is a very impressive tool based
on what I see so far.

Thanks,
Rich

On Nov 27, 9:30 pm, Richard Apodaca <rapod...@metamolecular.com>
wrote:


> I've just stumbled on the S2JS project and am very excited to give it a
> spin. Unfortunately, I'm hitting some problems in building the project
> jarfile. I'd like to use S2JS within Eclipse, as in this video:
>

> https://docs.google.com/leaf?id=0B5x_4fRggmLGMzA4MTAxYzktMmZjZS00Y2Nl...


>
> I know next to nothing about Scala, but here's what I've done:
>
> 1) Installed SBT 0.10.0 on OS X using MacPorts

> 2) $ git clonehttps://github.com/alvaroc1/s2js.git

Reply all
Reply to author
Forward
0 new messages