Scala Worksheet on Juno with Scala 2.10

556 views
Skip to first unread message

Michael Slinn

unread,
Oct 16, 2012, 12:47:46 PM10/16/12
to scala-i...@googlegroups.com
I have documented my attempt to get the Scala IDE worksheet to work with Scala 2.10 on Juno
http://mikeslinn.blogspot.com/2012/10/adventures-with-scala-210-worksheet-on.html

Suggestions?

Mike

iulian dragos

unread,
Oct 17, 2012, 4:04:02 PM10/17/12
to scala-i...@googlegroups.com
The yellow paragraph is confusing, and probably incorrect. You talk about workspaces, but then you say the plugin does not support this, and it leaves things installed in there. Plugins don't install inside the workspace, but the *configuration area*. The only thing that is stored in the workspace metadata is settings, but AFAIK that's not deleted when you uninstall any plugin. You may find this section useful: http://scala-ide.org/docs/tutorials/scalac-trunk/index.html#separating-eclipse-installation-from-workspace.

Scala 2.10.0-M7 is binary incompatible with the 2.10.0 nightly version, so if you want to use the nightly build of the worksheet, you need to install the nightly build of the IDE for 2.10.0 nightly (update site: http://download.scala-ide.org/nightly-update-juno-master-2.10.x)

cheers,
iulian


 

Mike



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Michael Slinn

unread,
Oct 17, 2012, 5:10:56 PM10/17/12
to scala-i...@googlegroups.com
Iulian,

Thanks for the information. I will follow your suggestions, update and correct the posting.

Best,

Mike

iulian dragos

unread,
Oct 18, 2012, 3:27:19 AM10/18/12
to scala-i...@googlegroups.com
On Wed, Oct 17, 2012 at 11:10 PM, Michael Slinn <msl...@gmail.com> wrote:
Iulian,

Thanks for the information. I will follow your suggestions, update and correct the posting.

Great, let us know if you encounter any difficulties. We'll have a new worksheet release very soon, so hopefully these things will be simpler for Juno as well.

iulian
 

Best,

Mike

Mirco Dotta

unread,
Oct 18, 2012, 3:36:24 AM10/18/12
to scala-i...@googlegroups.com
Eclipse hangs when I try to create a worksheet, right after I click Finish. Anyone have a workaround?

Does it always happens? If yes, then I think something is misconfigured. Please, have a look at the log: http://scala-ide.org/docs/helium/features/logging.html
When the hang occurs, you should use jps & jstack and provide a thread dump so that we can investigate (scala-ide.org/docs/user/faq.html#faq-known-issues#Eclipse_freezes__deadlock_). You should also keep in mind that Eclipse is not bugfree, so without more information it's hard to say who's to blame...

-- Mirco



---------------
Mirco Dotta
Typesafe - The software stack for applications that scale
PSE-D, 1015 Lausanne, Switzerland
Twitter: @mircodotta








Jacobus

unread,
Oct 19, 2012, 8:37:31 AM10/19/12
to scala-i...@googlegroups.com
Hi,

I have a similar setup, and it's working fine. There is probably a mis-configured setting somewhere.

Eclipse Juno:    http://download.eclipse.org/releases/juno
Scala IDE for 2.10:    http://download.scala-ide.org/nightly-update-juno-master-2.10.x
Scala Worksheet for 2.10:    http://download.scala-ide.org/nightly-update-worksheet-scalaide21-210/site/

Regards,
Jacobus

Michael Slinn

unread,
Oct 19, 2012, 10:57:01 AM10/19/12
to scala-i...@googlegroups.com
I updated my blog posting to follow the corrections. However, when I attempt to install Scala IDE nightly on Windows 7 64 bit using the launch script shown in the blog, I get:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Scala IDE for Eclipse 2.1.0.nightly-2_10-201210170449-fb08783 (org.scala-ide.sdt.feature.feature.group 2.1.0.nightly-2_10-201210170449-fb08783)
  Missing requirement: Scala IDE for Eclipse 2.1.0.nightly-2_10-201210170449-fb08783 (org.scala-ide.sdt.feature.feature.group 2.1.0.nightly-2_10-201210170449-fb08783) requires 'org.eclipse.sdk 0.0.0' but it could not be found

Mike

Michael Slinn

unread,
Oct 23, 2012, 9:28:11 AM10/23/12
to scala-i...@googlegroups.com
I tried once again, using what I think are the latest instructions. The blog post was updated. Complete failure. Is there currently a way to get Juno to work with a version of Scala 2.10 and a worksheet?

Mirco Dotta

unread,
Oct 23, 2012, 9:36:02 AM10/23/12
to scala-i...@googlegroups.com
I tried once again, using what I think are the latest instructions. The blog post was updated. Complete failure.

Define complete failure, i.e., what happens? what is the error?

Is there currently a way to get Juno to work with a version of Scala 2.10 and a worksheet?

Yes. Use the following update site to install both the Scala IDE V2.1.0-M2 and the Worksheet V0.1.2 http://download.scala-ide.org/sdk/e38/scala210/dev/site/

-- Mirco

Mirco Dotta

unread,
Oct 23, 2012, 9:57:08 AM10/23/12
to scala-i...@googlegroups.com
One more note, the IDE sluggishness is likely due to the fact that you are using Juno, as discussed here: http://groups.google.com/group/scala-ide-user/browse_thread/thread/7d0dbbeb072cfed5

-- Mirco

Michael Slinn

unread,
Oct 23, 2012, 12:49:23 PM10/23/12
to scala-i...@googlegroups.com
No error. No activity. Looks like I am editing a .txt file instead of a spreadsheet.

Mike

Michael Slinn

unread,
Oct 23, 2012, 12:49:57 PM10/23/12
to scala-i...@googlegroups.com
In this case sluggishness means several minutes wait per keystroke.

Mike

Mirco Dotta

unread,
Oct 24, 2012, 4:24:38 AM10/24/12
to scala-i...@googlegroups.com
On Oct 23, 2012, at 6:49 PM, Michael Slinn wrote:

No error. No activity. Looks like I am editing a .txt file instead of a spreadsheet.
This means that the worksheet was not installed. Please, check.

Mike

Mirco Dotta

unread,
Oct 24, 2012, 4:25:24 AM10/24/12
to scala-i...@googlegroups.com
In this case sluggishness means several minutes wait per keystroke.
Then something must be wrong with your setup/machine. Can you share your Eclipse config.ini?

Mike

Michael Slinn

unread,
Oct 24, 2012, 2:18:12 PM10/24/12
to scala-i...@googlegroups.com
My eclipse.ini is:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-server
-Xmn128m
-Xss2m
-XX:+UseParallelGC
-XX:PermSize=128m
-XX:MaxPermSize=128m
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms512m
-Xmx1124M

I updated my docs to show that I install everything from EclipseIDE 2.10 M2, including the worksheet.

I reinstalled from scratch and find that a new project works fine - hooray! However, the slick-examples that were built with 2.10-RC1 do not.

Description    Resource    Path    Location    Type
      while compiling: E:\work\experiments\scala\slick-presentation\src\main\scala\SlickPresentation.scala         during phase: erasure      library version: version 2.10.0-RC1     compiler version: version 2.10.0-RC1   reconstructed args: -Xpluginsdir C:\Program Files\eclipse\eclipse-jee-juno-win32-x86_64\configuration\org.eclipse.osgi\bundles\1187\1\.cp\lib -bootclasspath C:\Program Files\Java\jdk1.7.0_07\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_07\jre\classes;C:\Program Files\eclipse\eclipse-jee-juno-win32-x86_64\configuration\org.eclipse.osgi\bundles\1188\1\.cp\lib\scala-library.jar -classpath C:\Program Files\Java\jdk1.7.0_07\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\zipfs.jar;E:\work\experiments\scala\slick-presentation\target\scala-2.10\classes;E:\work\experiments\scala\slick-presentation\target\scala-2.10\test-classes;C:\Program Files\eclipse\eclipse-jee-juno-win32-x86_64\configuration\org.eclipse.osgi\bundles\1188\1\.cp\lib\scala-swing.jar;C:\Program Files\eclipse\eclipse-jee-juno-win32-x86_64\configuration\org.eclipse.osgi\bundles\1188\1\.cp\lib\scala-actors.jar;C:\Program Files\eclipse\eclipse-jee-juno-win32-x86_64\configuration\org.eclipse.osgi\bundles\1187\1\.cp\lib\scala-reflect.jar;C:\Users\Mike Slinn\.ivy2\cache\com.typesafe\slick_2.10.0-M7\jars\slick_2.10.0-M7-0.11.1.jar;C:\Users\Mike Slinn\.ivy2\cache\org.slf4j\slf4j-api\jars\slf4j-api-1.6.4.jar;C:\Program Files\eclipse\eclipse-jee-juno-win32-x86_64\configuration\org.eclipse.osgi\bundles\1187\1\.cp\lib\scala-compiler.jar;C:\Users\Mike Slinn\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.0-M7.jar;C:\Users\Mike Slinn\.ivy2\cache\org.slf4j\slf4j-nop\jars\slf4j-nop-1.6.4.jar;C:\Users\Mike Slinn\.ivy2\cache\com.h2database\h2\jars\h2-1.3.166.jar;C:\Users\Mike Slinn\.ivy2\cache\org.xerial\sqlite-jdbc\jars\sqlite-jdbc-3.6.20.jar    last tree to typer: This(anonymous class $anonfun)               symbol: anonymous class $anonfun (flags: final <synthetic>)    symbol definition: final class $anonfun extends AbstractFunction1[SlickPresentation.Task,String] with Serializable                  tpe: SlickPresentation.$anonfun.$anonfun.$anonfun.type        symbol owners: anonymous class $anonfun -> method apply -> anonymous class $anonfun -> value results -> method apply$mcV$sp -> anonymous class $anonfun -> value <local SlickPresentation> -> object SlickPresentation -> package <empty>       context owners: value p -> method apply -> anonymous class $anonfun -> method above -> object Persons -> object SlickPresentation -> package <empty>  == Enclosing template or block ==  DefDef( // final def apply(x$1: SlickPresentation.Persons.type): scala.slick.lifted.Column[Boolean]    <method> final    "apply"    []    // 1 parameter list    ValDef( // p: SlickPresentation.Persons.type      <param> <triedcooking>      "p"      <tpt> // tree.tpe=SlickPresentation.Persons.type      <empty>    )    <tpt> // tree.tpe=slick.lifted.Column    Apply( // def >[P2, R](e: scala.slick.lifted.Column[P2],implicit om: scala.slick.lifted.OptionMapper2[B1,B1,Boolean,P1,P2,R]): scala.slick.lifted.Column[R] in class ColumnExtensionMethods, tree.tpe=scala.slick.lifted.Column[Boolean]      TypeApply( // def >[P2, R](e: scala.slick.lifted.Column[P2],implicit om: scala.slick.lifted.OptionMapper2[B1,B1,Boolean,P1,P2,R]): scala.slick.lifted.Column[R] in class ColumnExtensionMethods, tree.tpe=(e: scala.slick.lifted.Column[Int], implicit om: scala.slick.lifted.OptionMapper2[Int,Int,Boolean,Int,Int,Boolean])scala.slick.lifted.Column[Boolean]        scala.slick.driver.H2Driver.simple().columnExtensionMethods[Int](p.age(), lifted.this.TypeMapper.IntTypeMapper)."$greater" // def >[P2, R](e: scala.slick.lifted.Column[P2],implicit om: scala.slick.lifted.OptionMapper2[B1,B1,Boolean,P1,P2,R]): scala.slick.lifted.Column[R] in class ColumnExtensionMethods, tree.tpe=[P2, R](e: scala.slick.lifted.Column[P2], implicit om: scala.slick.lifted.OptionMapper2[Int,Int,Boolean,Int,P2,R])scala.slick.lifted.Column[R]        // 2 type arguments        <tpt> // tree.tpe=Int        <tpt> // tree.tpe=Boolean      )      // 2 arguments      Apply( // implicit def valueToConstColumn[T](v: T,implicit evidence$2: scala.slick.lifted.TypeMapper[T]): scala.slick.lifted.ConstColumn[T] in class Implicits, tree.tpe=scala.slick.lifted.ConstColumn[Int]        TypeApply( // implicit def valueToConstColumn[T](v: T,implicit evidence$2: scala.slick.lifted.TypeMapper[T]): scala.slick.lifted.ConstColumn[T] in class Implicits, tree.tpe=(v: Int, implicit evidence$2: scala.slick.lifted.TypeMapper[Int])scala.slick.lifted.ConstColumn[Int]          scala.slick.driver.H2Driver.simple()."valueToConstColumn" // implicit def valueToConstColumn[T](v: T,implicit evidence$2: scala.slick.lifted.TypeMapper[T]): scala.slick.lifted.ConstColumn[T] in class Implicits, tree.tpe=[T](v: T, implicit evidence$2: scala.slick.lifted.TypeMapper[T])scala.slick.lifted.ConstColumn[T]          <tpt> // tree.tpe=Int        )        // 2 arguments        "age" // age: Int, tree.tpe=Int        lifted.this."TypeMapper"."IntTypeMapper" // implicit object IntTypeMapper in object TypeMapper, tree.tpe=scala.slick.lifted.TypeMapper.IntTypeMapper.type      )      Apply( // implicit def getOptionMapper2TT[B1, B2, BR](evidence$1: scala.slick.lifted.BaseTypeMapper[B2]): scala.slick.lifted.OptionMapper2[B1,B2,BR,B1,B2,BR] in object OptionMapper2, tree.tpe=scala.slick.lifted.OptionMapper2[Int,Int,Boolean,Int,Int,Boolean]        TypeApply( // implicit def getOptionMapper2TT[B1, B2, BR](evidence$1: scala.slick.lifted.BaseTypeMapper[B2]): scala.slick.lifted.OptionMapper2[B1,B2,BR,B1,B2,BR] in object OptionMapper2, tree.tpe=(evidence$1: scala.slick.lifted.BaseTypeMapper[Int])scala.slick.lifted.OptionMapper2[Int,Int,Boolean,Int,Int,Boolean]          lifted.this."OptionMapper2"."getOptionMapper2TT" // implicit def getOptionMapper2TT[B1, B2, BR](evidence$1: scala.slick.lifted.BaseTypeMapper[B2]): scala.slick.lifted.OptionMapper2[B1,B2,BR,B1,B2,BR] in object OptionMapper2, tree.tpe=[B1, B2, BR](evidence$1: scala.slick.lifted.BaseTypeMapper[B2])scala.slick.lifted.OptionMapper2[B1,B2,BR,B1,B2,BR]          // 3 type arguments          <tpt> // tree.tpe=Int          <tpt> // tree.tpe=Int          <tpt> // tree.tpe=Boolean        )        lifted.this."TypeMapper"."IntTypeMapper" // implicit object IntTypeMapper in object TypeMapper, tree.tpe=scala.slick.lifted.TypeMapper.IntTypeMapper.type      )    )  )  == Expanded type of tree ==  ThisType(anonymous class $anonfun)  uncaught exception during compilation: java.lang.AssertionError    slick-examples        Unknown    Scala Problem


RC1 is later than M2 so this is not surprising.

I would like to use RC1 instead of M2. Should this be possible? Are there any errors in my instructions? What update site should I use to fetch the RC1 build of EclipseIDE and worksheet?

Mike

Jacobus

unread,
Oct 24, 2012, 2:54:19 PM10/24/12
to scala-i...@googlegroups.com
Hi Mike,

Verify that you are using the latest version of Slick. It had some problems with 2.10-RC1 that was fixed earlier today. You can even do a git clone of slick and then use the sbt command publish-local to get the latest copy compiled locally.

Then make sure you are pointing to the correct version. A build.sbt like this should work fine (Notice it's using the snapshot version of slick):

scalaVersion := "2.10.0-RC1"

scalacOptions += "-deprecation"

resolvers ++= Seq("snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
                              "releases"  at "http://oss.sonatype.org/content/repositories/releases")

libraryDependencies ++= List(
  "com.typesafe" % "slick_2.10.0-RC1" % "1.0.0-SNAPSHOT"
  ,"com.h2database" % "h2" % "1.3.166"
  ,"org.xerial" % "sqlite-jdbc" % "3.6.20"
  ,"org.slf4j" % "slf4j-nop" % "1.6.4" // <- disables logging
  ,"org.specs2" % "specs2_2.10.0-RC1" % "1.12.2" % "test"
/*
// enables logging
  ,"org.slf4j" % "slf4j-api" % "1.6.4"
  ,"ch.qos.logback" % "logback-classic" % "0.9.28"
*/
/*
// Other database drivers
  "org.apache.derby" % "derby" % "10.6.1.0",
  "org.hsqldb" % "hsqldb" % "2.0.0",
  "postgresql" % "postgresql" % "8.4-701.jdbc4",
  "mysql" % "mysql-connector-java" % "5.1.13"
*/
)

Cheers,
Jacobus

Mike Slinn

unread,
Oct 24, 2012, 3:58:46 PM10/24/12
to scala-i...@googlegroups.com
Jacobus,

I made the changes you suggested and got:
sbt.ResolveException: unresolved dependency: com.typesafe#slick_2.10.0-RC1;1.0.0-SNAPSHOT: not found

I must get some other work done today so I cannot look at this any more until tomorrow. Perhaps the Slick snapshot will have propagated by then.

Should slick-examples be updated with this new build?

Thanks,

Mike

Jacobus

unread,
Oct 31, 2012, 4:00:14 PM10/31/12
to scala-i...@googlegroups.com
Hi Mike,

You can use a later version of Slick:
  "com.typesafe"      %   "slick_2.10.0-RC1"  % "0.11.2"

Here's an updated version of the build file. This one also includes Spray, which may come in handy if you are writing a REST service:

scalaVersion := "2.10.0-RC1"

scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")

resolvers ++= Seq(
  "sonatype releases" at "https://oss.sonatype.org/content/repositories/releases/",
  "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
  "typesafe repo" at "http://repo.typesafe.com/typesafe/releases/",
  "spray repo" at "http://repo.spray.io/"
)

libraryDependencies ++= Seq(
  "io.spray"           %   "spray-can"         % "1.1-M4.2"
  ,"io.spray"          %   "spray-routing"     % "1.1-M4.2"
  ,"io.spray"          %   "spray-testkit"     % "1.1-M4.2"
  ,"io.spray"          %%  "spray-json"        % "1.2.2"     cross CrossVersion.full
  ,"com.typesafe.akka" %%  "akka-actor"        % "2.1.0-RC1" cross CrossVersion.full
  ,"org.specs2"        %%  "specs2" % "1.12.2" % "test"      cross CrossVersion.full
  ,"com.typesafe"      %   "slick_2.10.0-RC1"  % "0.11.2"

  ,"com.h2database"    %   "h2"                % "1.3.166"
  ,"org.xerial"        %   "sqlite-jdbc"       % "3.6.20"
  ,"org.slf4j"         %   "slf4j-nop"         % "1.6.4"     // <- disables logging
  ,"org.specs2"        %   "specs2_2.10.0-RC1" % "1.12.2"    % "test"
  ,"junit"             %   "junit"             % "4.8.1"     % "test"

/*
// enables logging
  ,"org.slf4j" % "slf4j-api" % "1.6.4"
  ,"ch.qos.logback" % "logback-classic" % "0.9.28"
*/
/*
// Other database drivers
  "org.apache.derby" % "derby" % "10.6.1.0",
  "org.hsqldb" % "hsqldb" % "2.0.0",
  "postgresql" % "postgresql" % "8.4-701.jdbc4",
  "mysql" % "mysql-connector-java" % "5.1.13"
*/
)

Michael Slinn

unread,
Nov 1, 2012, 2:24:55 PM11/1/12
to scala-i...@googlegroups.com
Thank you!

Mike
Reply all
Reply to author
Forward
0 new messages