diff options
50 files changed, 744 insertions, 275 deletions
diff --git a/.gitignore b/.gitignore index 061cd274ac..0fff976e90 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ /jenkins.properties # target directories for ant build +/build /build/ /dists/ @@ -55,5 +56,6 @@ # Sbt's target directories /target/ /project/target/ -/project/project/target +/project/project/target/ +/project/project/project/target/ /build-sbt/ @@ -131,7 +131,7 @@ Here, `<milestone>` is the milestone targeted by the PR (e.g., 2.11.6), and `<sh ## IDE Setup ### Eclipse -See `src/eclipse/README.md`. +See [src/eclipse/README.md](src/eclipse/README.md). ### IntelliJ 15 See [src/intellij/README.md](src/intellij/README.md). diff --git a/bincompat-backward.whitelist.conf b/bincompat-backward.whitelist.conf index 0d85590b41..0770b3cb95 100644 --- a/bincompat-backward.whitelist.conf +++ b/bincompat-backward.whitelist.conf @@ -217,6 +217,12 @@ filter { { matchName="scala.concurrent.impl.Promise$DefaultPromise" problemName=MissingTypesProblem + }, + // SI-9488: Due to SI-8362 above, toString was silently changed to the AtomicReference toString implementation, + // This is fixed by SI-9488, and this should be safe since the class in question is stdlib internal. + { + matchName="scala.concurrent.impl.Promise.toString" + problemName=MissingMethodProblem } ] } diff --git a/bincompat-forward.whitelist.conf b/bincompat-forward.whitelist.conf index a9fbaa7b87..c6cffee846 100644 --- a/bincompat-forward.whitelist.conf +++ b/bincompat-forward.whitelist.conf @@ -381,6 +381,12 @@ filter { { matchName="scala.concurrent.impl.Promise$DefaultPromise" problemName=MissingTypesProblem + }, + // SI-9488: Due to SI-8362 above, toString was silently changed to the AtomicReference toString implementation, + // This is fixed by SI-9488, and this should be safe since the class in question is stdlib internal. + { + matchName="scala.concurrent.impl.Promise.toString" + problemName=MissingMethodProblem } ] } @@ -492,7 +492,6 @@ lazy val replJlineEmbedded = Project("repl-jline-embedded", file(".") / "target" x.name.endsWith(".class") || x.name.endsWith(".properties") || x.name.startsWith("META-INF/native") || x.name.startsWith("META-INF/maven") ) } - //println(inputs.map(_.name).mkString("\n")) import JarJar.JarJarConfig._ val config: Seq[JarJar.JarJarConfig] = Seq( Rule("org.fusesource.**", "scala.tools.fusesource_embedded.@1"), @@ -879,3 +878,158 @@ commands ++= { } addCommandAlias("scalap", "scalap/compile:runMain scala.tools.scalap.Main -usejavacp") + +lazy val intellij = taskKey[Unit]("Update the library classpaths in the IntelliJ project files.") + +def moduleDeps(p: Project) = (externalDependencyClasspath in Compile in p).map(a => (p.id, a.map(_.data))) + +// aliases to projects to prevent name clashes +def compilerP = compiler +def testP = test + +intellij := { + import xml._ + import xml.transform._ + + val s = streams.value + + val modules: List[(String, Seq[File])] = { + // for the sbt build module, the dependencies are fetched from the project's build using sbt-buildinfo + val buildModule = ("scala-build", scalabuild.BuildInfo.buildClasspath.split(":").toSeq.map(new File(_))) + // `sbt projects` lists all modules in the build + buildModule :: List( + moduleDeps(actors).value, + moduleDeps(compilerP).value, + // moduleDeps(dist).value, // No sources, therefore no module in IntelliJ + moduleDeps(forkjoin).value, + moduleDeps(interactive).value, + moduleDeps(junit).value, + moduleDeps(library).value, + // moduleDeps(libraryAll).value, // No sources + moduleDeps(manual).value, + moduleDeps(partestExtras).value, + moduleDeps(partestJavaAgent).value, + moduleDeps(reflect).value, + moduleDeps(repl).value, + moduleDeps(replJline).value, + // moduleDeps(replJlineEmbedded).value, // No sources + // moduleDeps(root).value, // No sources + // moduleDeps(scalaDist).value, // No sources + moduleDeps(scaladoc).value, + moduleDeps(scalap).value, + moduleDeps(testP).value) + } + + def moduleDep(name: String, jars: Seq[File]) = { + val entries = jars.map(f => s""" <root url="jar://${f.toURI.getRawPath}!/" />""").mkString("\n") + s"""| <library name="${name}-deps"> + | <CLASSES> + |$entries + | </CLASSES> + | <JAVADOC /> + | <SOURCES /> + | </library>""".stripMargin + } + + def starrDep(jars: Seq[File]) = { + val entries = jars.map(f => s""" <root url="file://${f.toURI.getRawPath}" />""").mkString("\n") + s"""| <library name="starr" type="Scala"> + | <properties> + | <option name="languageLevel" value="Scala_2_12" /> + | <compiler-classpath> + |$entries + | </compiler-classpath> + | </properties> + | <CLASSES /> + | <JAVADOC /> + | <SOURCES /> + | </library>""".stripMargin + } + + def replaceLibrary(data: Node, libName: String, libType: Option[String], newContent: String) = { + object rule extends RewriteRule { + var transformed = false + def checkAttrs(attrs: MetaData) = { + def check(key: String, expected: String) = { + val a = attrs(key) + a != null && a.text == expected + } + check("name", libName) && libType.forall(tp => check("type", tp)) + } + + override def transform(n: Node): Seq[Node] = n match { + case e @ Elem(_, "library", attrs, _, _, _*) if checkAttrs(attrs) => + transformed = true + XML.loadString(newContent) + case other => + other + } + } + object trans extends RuleTransformer(rule) + val r = trans(data) + if (!rule.transformed) sys.error(s"Replacing library classpath for $libName failed, no existing library found.") + r + } + + val ipr = (baseDirectory in ThisBuild).value / "src/intellij/scala.ipr" + + var continue = false + if (!ipr.exists) { + scala.Console.print(s"Could not find src/intellij/scala.ipr. Create new project files from src/intellij/*.SAMPLE (y/N)? ") + if (scala.Console.readLine() == "y") { + intellijCreateFromSample((baseDirectory in ThisBuild).value) + continue = true + } + } else { + scala.Console.print("Update library classpaths in the current src/intellij/scala.ipr (y/N)? ") + continue = scala.Console.readLine() == "y" + } + if (continue) { + s.log.info("Updating library classpaths in src/intellij/scala.ipr.") + val content = XML.loadFile(ipr) + + val newStarr = replaceLibrary(content, "starr", Some("Scala"), starrDep((scalaInstance in LocalProject("compiler")).value.jars)) + val newModules = modules.foldLeft(newStarr)({ + case (res, (modName, jars)) => + if (jars.isEmpty) res // modules without dependencies + else replaceLibrary(res, s"$modName-deps", None, moduleDep(modName, jars)) + }) + + XML.save(ipr.getAbsolutePath, newModules) + } else { + s.log.info("Aborting.") + } +} + +lazy val intellijFromSample = taskKey[Unit]("Create fresh IntelliJ project files from src/intellij/*.SAMPLE.") + +intellijFromSample := { + val s = streams.value + scala.Console.print(s"Create new project files from src/intellij/*.SAMPLE (y/N)? ") + if (scala.Console.readLine() == "y") + intellijCreateFromSample((baseDirectory in ThisBuild).value) + else + s.log.info("Aborting.") +} + +def intellijCreateFromSample(basedir: File): Unit = { + val files = basedir / "src/intellij" * "*.SAMPLE" + val copies = files.get.map(f => (f, new File(f.getAbsolutePath.stripSuffix(".SAMPLE")))) + IO.copy(copies, overwrite = true) +} + +lazy val intellijToSample = taskKey[Unit]("Update src/intellij/*.SAMPLE using the current IntelliJ project files.") + +intellijToSample := { + val s = streams.value + scala.Console.print(s"Update src/intellij/*.SAMPLE using the current IntelliJ project files (y/N)? ") + if (scala.Console.readLine() == "y") { + val basedir = (baseDirectory in ThisBuild).value + val existing = basedir / "src/intellij" * "*.SAMPLE" + IO.delete(existing.get) + val current = basedir / "src/intellij" * ("*.iml" || "*.ipr") + val copies = current.get.map(f => (f, new File(f.getAbsolutePath + ".SAMPLE"))) + IO.copy(copies) + } else + s.log.info("Aborting.") +} diff --git a/project/plugins.sbt b/project/plugins.sbt index c21824baf9..2d91c2306b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,3 +3,15 @@ libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.3.2" libraryDependencies += "org.pantsbuild" % "jarjar" % "1.6.0" libraryDependencies += "biz.aQute" % "bndlib" % "1.50.0" + +enablePlugins(BuildInfoPlugin) + +// configure sbt-buildinfo to send the externalDependencyClasspath to the main build, which allows using it for the IntelliJ project config + +lazy val buildClasspath = taskKey[String]("Colon-separated list of entries on the sbt build classpath.") + +buildClasspath := (externalDependencyClasspath in Compile).value.map(_.data).mkString(":") + +buildInfoKeys := Seq[BuildInfoKey](buildClasspath) + +buildInfoPackage := "scalabuild" diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt new file mode 100644 index 0000000000..04935e4560 --- /dev/null +++ b/project/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.6.1") diff --git a/scripts/jobs/integrate/ide b/scripts/jobs/integrate/ide index 1651ad2892..ea7d746822 100755 --- a/scripts/jobs/integrate/ide +++ b/scripts/jobs/integrate/ide @@ -3,6 +3,10 @@ # requires env: scalaVersion (specifies binary already built from above checkout), WORKSPACE (provided by jenkins), repo_ref (HEAD of the scala checkout), # requires files: $baseDir/versions.properties (from checkout -- defines version numbers for modules used to build scala for dbuild...) +echo "IDE integration disabled for now on 2.11.x. Punting." +echo "see https://github.com/scala/scala-dev/issues/104" +exit 0 + # TODO: remove when integration is up and running if [ "woele$_scabot_last" != "woele1" ]; then echo "Scabot didn't mark this as last commit -- skipping."; exit 0; fi diff --git a/scripts/jobs/integrate/windows b/scripts/jobs/integrate/windows index b1f94a5603..b823c1cdf9 100755 --- a/scripts/jobs/integrate/windows +++ b/scripts/jobs/integrate/windows @@ -4,9 +4,13 @@ export ANT_OPTS="-Dfile.encoding=UTF-8 -server -XX:+AggressiveOpts -XX:+UseParNewGC -Xmx2G -Xss1M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=128M" -# TODO: don't hardcode this path, which is just where we currently have -# ant manually installed on jenkins-worker-windows-publish. -PATH=/cygdrive/c/apache-ant-1.9.6/bin:$PATH +# TODO: don't hardcode this path -- should be in scala/scala-jenkins-infra +export PATH='/cygdrive/c/java/jdk-1.6/bin:/cygdrive/c/apache-ant-1.9.6/bin:/cygdrive/c/Program Files (x86)/Git-2.5.3/Cmd:/bin:/usr/bin:' +export JAVA_HOME='C:/java/jdk-1.6' + +java -version +javac -version +ant -version ant \ -Dstarr.version=2.11.8 \ diff --git a/src/eclipse/README.md b/src/eclipse/README.md index fe2c109402..d541092361 100644 --- a/src/eclipse/README.md +++ b/src/eclipse/README.md @@ -7,21 +7,20 @@ The following points describe how to build Scala using Eclipse. 0. Download the [Scala IDE bundle](http://scala-ide.org/download/sdk.html). It comes preconfigured for optimal performance. -0. Run `ant init` to download some necessary jars. - -0. Import the project (in `src/eclipse`) via `File` → `Import Existing Projects` and navigate to `scala/src/eclipse`. Check all projects and click ok. - -0. You need to define a `path variable` inside Eclipse. Define `SCALA_BASEDIR` in -`Preferences/General/Workspace/Linked Resources`. The value should be the absolute -path to your Scala checkout. All paths in the project files are relative to this one, -so nothing will work before you do so. - - The same `SCALA_BASEDIR` variable needs to be defined as a `classpath variable` in +0. Run `ant build` to download some necessary jars and see a successful build. + +0. You need to define a `path variable` and a `classpath variable` inside Eclipse, both pointing to the Scala checkout directory: + - (experimental): run `./update-workspace.sh scala_checkout_dir [workspace_dir]`. This should update your workspace settings + (restart Eclipse if it was running). For example: + ``` + ./update-workspace.sh $HOME/git/scala ~/Documents/workspace-scalac + ``` + - If the above didn't work, you can perform these steps manually: Define `SCALA_BASEDIR` in `Preferences/General/Workspace/Linked Resources`. The value should be the absolute +path to your Scala checkout. All paths in the project files are relative to this one, so nothing will work before you do so. +The same `SCALA_BASEDIR` variable needs to be defined **also** as a `classpath variable` in `Java/Build Path/Classpath Variables`. - Additionally, we start using Maven dependencies (e.g. `JUnit`) so you need to define another -`classpath variable` inside Eclipse. Define `M2_REPO` in `Java/Build Path/Classpath Variables` -to point to your local Maven repository (e.g. `$HOME/.m2/repository`). +0. Import the project (in `src/eclipse`) via `File` → `Import Existing Projects` and navigate to `scala/src/eclipse`. Check all projects and click ok. Lastly, the JRE used by Eclipse needs to know the path to the `JLine` library, which is used by the REPL. To set the JAR file, navigate to `Java/Installed JREs`, select the default JRE, press `Edit/Add External JARs...` diff --git a/src/eclipse/interactive/.classpath b/src/eclipse/interactive/.classpath index 565492bc63..721351a207 100644 --- a/src/eclipse/interactive/.classpath +++ b/src/eclipse/interactive/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="interactive"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-asm/5.0.4-scala-3/scala-asm-5.0.4-scala-3.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/asm/scala-asm-5.0.4-scala-3.jar"/> <classpathentry combineaccessrules="false" kind="src" path="/scaladoc"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-compiler"/> diff --git a/src/eclipse/partest/.classpath b/src/eclipse/partest/.classpath index 9e3a3c9b6c..4dc5dd77d0 100644 --- a/src/eclipse/partest/.classpath +++ b/src/eclipse/partest/.classpath @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="partest-extras"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-asm/5.0.4-scala-3/scala-asm-5.0.4-scala-3.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/asm/scala-asm-5.0.4-scala-3.jar"/> <classpathentry combineaccessrules="false" kind="src" path="/repl"/> - <classpathentry kind="var" path="M2_REPO/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar"/> - <classpathentry kind="var" path="M2_REPO/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-partest_2.11/1.0.9/scala-partest_2.11-1.0.9.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/partest/diffutils-1.3.0.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/partest/test-interface-1.0.jar"/> <classpathentry kind="var" path="SCALA_BASEDIR/lib/ant/ant.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-compiler"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-library"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/partest/scala-partest_2.11-1.0.13.jar"/> <classpathentry kind="output" path="build-quick-partest-extras"/> </classpath> diff --git a/src/eclipse/reflect/.classpath b/src/eclipse/reflect/.classpath index 3f14621da7..ee6bcd47da 100644 --- a/src/eclipse/reflect/.classpath +++ b/src/eclipse/reflect/.classpath @@ -3,5 +3,6 @@ <classpathentry kind="src" path="reflect"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-library"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/> <classpathentry kind="output" path="build-quick-reflect"/> </classpath> diff --git a/src/eclipse/repl/.classpath b/src/eclipse/repl/.classpath index 56d83c0f04..682377adc9 100644 --- a/src/eclipse/repl/.classpath +++ b/src/eclipse/repl/.classpath @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="repl"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-asm/5.0.4-scala-3/scala-asm-5.0.4-scala-3.jar"/> - <classpathentry kind="var" path="M2_REPO/jline/jline/2.12.1/jline-2.12.1.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/asm/scala-asm-5.0.4-scala-3.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/repl/jline-2.12.1.jar"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-compiler"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-library"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/interactive"/> <classpathentry kind="output" path="build-quick-repl"/> </classpath> diff --git a/src/eclipse/scala-compiler/.classpath b/src/eclipse/scala-compiler/.classpath index 6c9be61039..625b9b2e4b 100644 --- a/src/eclipse/scala-compiler/.classpath +++ b/src/eclipse/scala-compiler/.classpath @@ -4,7 +4,8 @@ <classpathentry combineaccessrules="false" exported="true" kind="src" path="/reflect"/> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/scala-library"/> <classpathentry kind="var" path="SCALA_BASEDIR/lib/ant/ant.jar"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-asm/5.0.4-scala-3/scala-asm-5.0.4-scala-3.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/asm/scala-asm-5.0.4-scala-3.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/> <classpathentry kind="output" path="build-quick-compiler"/> </classpath> diff --git a/src/eclipse/scaladoc/.classpath b/src/eclipse/scaladoc/.classpath index 568cf678c6..a3d177a751 100644 --- a/src/eclipse/scaladoc/.classpath +++ b/src/eclipse/scaladoc/.classpath @@ -2,12 +2,12 @@ <classpath> <classpathentry kind="src" path="scaladoc"/> <classpathentry kind="var" path="SCALA_BASEDIR/lib/ant/ant.jar"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-asm/5.0.4-scala-3/scala-asm-5.0.4-scala-3.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/asm/scala-asm-5.0.4-scala-3.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-compiler"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-library"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-xml_2.11/1.0.4/scala-xml_2.11-1.0.4.jar"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-partest_2.11/1.0.9/scala-partest_2.11-1.0.9.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/scaladoc/scala-xml_2.11-1.0.5.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/scaladoc/scala-parser-combinators_2.11-1.0.4.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/partest/scala-partest_2.11-1.0.13.jar"/> <classpathentry kind="output" path="build-quick-scaladoc"/> </classpath> diff --git a/src/eclipse/test-junit/.classpath b/src/eclipse/test-junit/.classpath index 92c0b74f70..a6445caebe 100644 --- a/src/eclipse/test-junit/.classpath +++ b/src/eclipse/test-junit/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="test-junit"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-asm/5.0.4-scala-3/scala-asm-5.0.4-scala-3.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/asm/scala-asm-5.0.4-scala-3.jar"/> <classpathentry kind="var" path="SCALA_BASEDIR/lib/ant/ant.jar"/> <classpathentry combineaccessrules="false" kind="src" path="/reflect"/> <classpathentry combineaccessrules="false" kind="src" path="/scala-library"/> @@ -10,7 +10,7 @@ <classpathentry combineaccessrules="false" kind="src" path="/repl"/> <classpathentry combineaccessrules="false" kind="src" path="/partest-extras"/> <classpathentry combineaccessrules="false" kind="src" path="/scaladoc"/> - <classpathentry kind="var" path="M2_REPO/org/scala-lang/modules/scala-xml_2.11/1.0.4/scala-xml_2.11-1.0.4.jar"/> + <classpathentry kind="var" path="SCALA_BASEDIR/build/deps/scaladoc/scala-xml_2.11-1.0.5.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> <classpathentry kind="output" path="build-test-junit"/> </classpath> diff --git a/src/eclipse/update-workspace.sh b/src/eclipse/update-workspace.sh new file mode 100755 index 0000000000..24382d1445 --- /dev/null +++ b/src/eclipse/update-workspace.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +function usage() { + echo "$0 scala_checkout_dir [workspace_dir]" + echo "\n Add necessary path variables to Eclipse workspace settings for Scalac to build" +} + +METADATA_DIR=`pwd`/.metadata + +if [ $# -lt 1 ]; then + echo "Need the Scala directory checkout as argument" + exit 1 +fi + +SCALA_DIR=$1 + +if [ ! -z $2 ]; then + METADATA_DIR=$2/.metadata +fi + +if [ ! -d $METADATA_DIR ]; then + echo "$METADATA_DIR is not a directory" + exit 1 +fi + +echo "Using metadata directory $METADATA_DIR and Scala checkout $SCALA_DIR" + +CORE_PREFS=$METADATA_DIR/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs +if [ ! -f $CORE_PREFS ]; then + echo "Couldn't find $CORE_PREFS. Is $METADATA_DIR an Eclipse workspace?" + exit 1 +fi +echo -e "Workspace preferences:\t$CORE_PREFS" + +JDT_PREFS=$METADATA_DIR/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs +if [ ! -f $JDT_PREFS ]; then + echo "Couldn't find $JDT_PREFS. Creating fresh file." + touch $JDT_PREFS +fi +echo -e "JDT preferences:\t$JDT_PREFS" + +# $1 - preference file (will be backed-up before writing) +# $2 - preference key +# $3 - preference value +function updatePref() { + mv $1 ${1}_backup + + awk -v key=$2 -v value=$3 ' + BEGIN { + FS="="; + OFS="="; + prev="" + } + { + if ($1 == key) { + prev=$2 + $2=value + } + print + } + END { + if (prev) { + printf "Updated existing value from %s to %s\n", prev, value > "/dev/stderr" + } else { + print key,value + } + } + ' ${1}_backup >$1 +} + +updatePref $CORE_PREFS "pathvariable.SCALA_BASEDIR" $SCALA_DIR +updatePref $JDT_PREFS "org.eclipse.jdt.core.classpathVariable.SCALA_BASEDIR" $SCALA_DIR diff --git a/src/intellij/README.md b/src/intellij/README.md index 64e7b8188a..c311afda9c 100644 --- a/src/intellij/README.md +++ b/src/intellij/README.md @@ -1,13 +1,41 @@ -Use the latest IntelliJ IDEA release and install the Scala plugin from within the IDE. +# Building Scala in IntelliJ IDEA -Compilation withing IDEA is performed in "-Dlocker.skip=1" mode: the sources are built -directly using the STARR compiler. +## Requirements -The following steps are required to use IntelliJ IDEA on Scala trunk - - Run `ant init`. This will download some JARs to `./build/deps`, which are included in IntelliJ's classpath. - - Run `./src/intellij/setup.sh`. - - Open `./src/intellij/scala.ipr` in IntelliJ. - - `File` → `Project Structure` → `Project` → `Project SDK`. Create an SDK entry named "1.6" containing the Java 1.6 SDK. (Or other SDK version; see "Requirements" in the repo's main README.) +Use the latest IntelliJ release and install the Scala plugin from within the IDE. -Compilation within IDEA is performed in `-Dlocker.skip=1` mode: the sources are built -directly using the STARR compiler (which is downloaded from [the Central Repository](http://central.sonatype.org/), according to `starr.version` in `versions.properties`). +## Initial setup + +To create the IntelliJ project files: + + - Run `sbt intellij` + - Open `src/intellij/scala.ipr` in IntelliJ + - In `File` → `Project Structure` → `Project` → `Project SDK`, create an SDK entry named "1.6" containing the Java 1.6 SDK + +The project files are created by as copies of the `.SAMPLE` files, which are under version control. +The actual IntelliJ project files are in `.gitignore` so that local changes are ignored. + +## Dependencies + +For every module in the IntelliJ project there is a corresponding `-deps` library, for exmaple `compiler-deps` provides `ant.jar` for the compiler codebase. +The `.jar` files in these `-deps` libraries can be easily kept up-to-date by running `sbt intellij` again. +This is necessary whenever the dependencies in the sbt build change, for example when the STARR version is updated. + +Note that this command only patches the dependency lists, all other settings in the IntelliJ project definition are unchanged. +To overwrite the project definition files by copying the `.SAMPLE` files again run `sbt intellijFromSample`. + +## Usage + +Compiling, running, JUnit tests and debugging should all work. +You can work on the compiler, the standard library, and other components as well. + +Note that compilation within IntelliJ is performed in a single pass. +The code is compiled using the "STARR" (stable reference) compiler, as specified by `starr.version` in `versions.properties`. +This is consistent with the sbt build. + +Note that the output directory when compiling in IntelliJ is the same as for the sbt build. +This allows building incrementally in IntelliJ and directly use the changes using the command-line scripts in `build/quick/bin/`. + +## Updating the `.SAMPLE` files + +The command `intellijToSample` overwrites the `.SAMPLE` files using the current project definition files. diff --git a/src/intellij/actors.iml.SAMPLE b/src/intellij/actors.iml.SAMPLE index dfdf396c46..f012ee7b0f 100644 --- a/src/intellij/actors.iml.SAMPLE +++ b/src/intellij/actors.iml.SAMPLE @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/actors" /> + <output-test url="file://$MODULE_DIR$/../../out/test/actors" /> <exclude-output /> <content url="file://$MODULE_DIR$/../actors"> <sourceFolder url="file://$MODULE_DIR$/../actors" isTestSource="false" /> diff --git a/src/intellij/asm.iml.SAMPLE b/src/intellij/asm.iml.SAMPLE deleted file mode 100644 index 9886154bdf..0000000000 --- a/src/intellij/asm.iml.SAMPLE +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> - <content url="file://$MODULE_DIR$/../asm"> - <sourceFolder url="file://$MODULE_DIR$/../asm" isTestSource="false" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - </component> -</module>
\ No newline at end of file diff --git a/src/intellij/compiler.iml.SAMPLE b/src/intellij/compiler.iml.SAMPLE index 0e121925e6..1ebf409c1b 100644 --- a/src/intellij/compiler.iml.SAMPLE +++ b/src/intellij/compiler.iml.SAMPLE @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/compiler" /> + <output-test url="file://$MODULE_DIR$/../../out/test/compiler" /> <exclude-output /> <content url="file://$MODULE_DIR$/../compiler"> - <sourceFolder url="file://$MODULE_DIR$/../compiler/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/../compiler" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="library" /> <orderEntry type="module" module-name="reflect" /> + <orderEntry type="library" name="compiler-deps" level="project" /> <orderEntry type="library" name="starr" level="project" /> - <orderEntry type="library" name="ant" level="project" /> - <orderEntry type="library" name="asm" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/diff.sh b/src/intellij/diff.sh deleted file mode 100755 index 54f9248608..0000000000 --- a/src/intellij/diff.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# -# Diffs the SAMPLE files against the working project config. -# -export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -for f in "$SCRIPT_DIR"/*.{iml,ipr}; do - echo $f; diff -u $f.SAMPLE $f; -done diff --git a/src/intellij/forkjoin.iml.SAMPLE b/src/intellij/forkjoin.iml.SAMPLE index 42507b2911..aa3f83e56e 100644 --- a/src/intellij/forkjoin.iml.SAMPLE +++ b/src/intellij/forkjoin.iml.SAMPLE @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/forkjoin" /> + <output-test url="file://$MODULE_DIR$/../../out/test/forkjoin" /> <exclude-output /> <content url="file://$MODULE_DIR$/../forkjoin"> <sourceFolder url="file://$MODULE_DIR$/../forkjoin" isTestSource="false" /> diff --git a/src/intellij/interactive.iml.SAMPLE b/src/intellij/interactive.iml.SAMPLE index 267bd3f12b..05b4e162db 100644 --- a/src/intellij/interactive.iml.SAMPLE +++ b/src/intellij/interactive.iml.SAMPLE @@ -1,16 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/interactive" /> + <output-test url="file://$MODULE_DIR$/../../out/test/interactive" /> <exclude-output /> <content url="file://$MODULE_DIR$/../interactive"> <sourceFolder url="file://$MODULE_DIR$/../interactive" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="library" /> <orderEntry type="module" module-name="reflect" /> + <orderEntry type="module" module-name="compiler" /> + <orderEntry type="library" name="interactive-deps" level="project" /> <orderEntry type="library" name="starr" level="project" /> - <orderEntry type="library" name="asm" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/test-junit.iml.SAMPLE b/src/intellij/junit.iml.SAMPLE index 86dc39c175..e0f52aa42a 100644 --- a/src/intellij/test-junit.iml.SAMPLE +++ b/src/intellij/junit.iml.SAMPLE @@ -1,23 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/junit" /> + <output-test url="file://$MODULE_DIR$/../../out/test/junit" /> <exclude-output /> <content url="file://$MODULE_DIR$/../../test/junit"> <sourceFolder url="file://$MODULE_DIR$/../../test/junit" isTestSource="true" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="actors" /> - <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="forkjoin" /> <orderEntry type="module" module-name="library" /> - <orderEntry type="module" module-name="partest-extras" /> + <orderEntry type="module" module-name="actors" /> <orderEntry type="module" module-name="reflect" /> + <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="repl" /> + <orderEntry type="module" module-name="interactive" /> <orderEntry type="module" module-name="scaladoc" /> - <orderEntry type="library" name="scaladoc-deps" level="project" /> - <orderEntry type="library" name="junit" level="project" /> + <orderEntry type="module" module-name="partest-extras" /> + <orderEntry type="library" name="junit-deps" level="project" /> <orderEntry type="library" name="starr" level="project" /> - <orderEntry type="library" name="asm" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/library.iml.SAMPLE b/src/intellij/library.iml.SAMPLE index b03fef9414..ce61c097bd 100644 --- a/src/intellij/library.iml.SAMPLE +++ b/src/intellij/library.iml.SAMPLE @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/library" /> + <output-test url="file://$MODULE_DIR$/../../out/test/library" /> <exclude-output /> <content url="file://$MODULE_DIR$/../library"> - <sourceFolder url="file://$MODULE_DIR$/../library/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/../library" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> diff --git a/src/intellij/manual.iml.SAMPLE b/src/intellij/manual.iml.SAMPLE index 97bfb5940a..a2ef6e4625 100644 --- a/src/intellij/manual.iml.SAMPLE +++ b/src/intellij/manual.iml.SAMPLE @@ -8,8 +8,7 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="library" /> - <orderEntry type="library" name="scaladoc-deps" level="project" /> - <orderEntry type="library" name="ant" level="project" /> + <orderEntry type="library" name="manual-deps" level="project" /> <orderEntry type="library" name="starr" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/partest-extras.iml.SAMPLE b/src/intellij/partest-extras.iml.SAMPLE index 1cd712184b..79c736f7da 100644 --- a/src/intellij/partest-extras.iml.SAMPLE +++ b/src/intellij/partest-extras.iml.SAMPLE @@ -1,18 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/partest-extras" /> + <output-test url="file://$MODULE_DIR$/../../out/test/partest-extras" /> <exclude-output /> <content url="file://$MODULE_DIR$/../partest-extras"> <sourceFolder url="file://$MODULE_DIR$/../partest-extras" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="library" /> <orderEntry type="module" module-name="reflect" /> + <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="repl" /> - <orderEntry type="library" name="partest" level="project" /> + <orderEntry type="library" name="partest-extras-deps" level="project" /> <orderEntry type="library" name="starr" level="project" /> - <orderEntry type="library" name="asm" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/partest-javaagent.iml.SAMPLE b/src/intellij/partest-javaagent.iml.SAMPLE index ffc540cdb9..22c2cbf1bc 100644 --- a/src/intellij/partest-javaagent.iml.SAMPLE +++ b/src/intellij/partest-javaagent.iml.SAMPLE @@ -1,12 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/partest-javaagent" /> + <output-test url="file://$MODULE_DIR$/../../out/test/partest-javaagent" /> <exclude-output /> <content url="file://$MODULE_DIR$/../partest-javaagent"> <sourceFolder url="file://$MODULE_DIR$/../partest-javaagent" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="asm" level="project" /> + <orderEntry type="library" name="partest-javaagent-deps" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/reflect.iml.SAMPLE b/src/intellij/reflect.iml.SAMPLE index c9b7130aef..d0aba81f0b 100644 --- a/src/intellij/reflect.iml.SAMPLE +++ b/src/intellij/reflect.iml.SAMPLE @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/reflect" /> + <output-test url="file://$MODULE_DIR$/../../out/test/reflect" /> <exclude-output /> <content url="file://$MODULE_DIR$/../reflect"> <sourceFolder url="file://$MODULE_DIR$/../reflect" isTestSource="false" /> diff --git a/src/intellij/repl-jline.iml.SAMPLE b/src/intellij/repl-jline.iml.SAMPLE new file mode 100644 index 0000000000..b765a58d96 --- /dev/null +++ b/src/intellij/repl-jline.iml.SAMPLE @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/repl-jline" /> + <output-test url="file://$MODULE_DIR$/../../out/test/repl-jline" /> + <exclude-output /> + <content url="file://$MODULE_DIR$/../repl-jline"> + <sourceFolder url="file://$MODULE_DIR$/../repl-jline" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="library" /> + <orderEntry type="module" module-name="reflect" /> + <orderEntry type="module" module-name="compiler" /> + <orderEntry type="module" module-name="interactive" /> + <orderEntry type="module" module-name="repl" /> + <orderEntry type="library" name="repl-jline-deps" level="project" /> + <orderEntry type="library" name="starr" level="project" /> + </component> +</module>
\ No newline at end of file diff --git a/src/intellij/repl.iml.SAMPLE b/src/intellij/repl.iml.SAMPLE index e827a2c6d7..07e2923726 100644 --- a/src/intellij/repl.iml.SAMPLE +++ b/src/intellij/repl.iml.SAMPLE @@ -1,18 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/repl" /> + <output-test url="file://$MODULE_DIR$/../../out/test/repl" /> <exclude-output /> <content url="file://$MODULE_DIR$/../repl"> <sourceFolder url="file://$MODULE_DIR$/../repl" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="library" /> <orderEntry type="module" module-name="reflect" /> + <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="interactive" /> - <orderEntry type="library" name="starr" level="project" /> <orderEntry type="library" name="repl-deps" level="project" /> - <orderEntry type="library" name="asm" level="project" /> + <orderEntry type="library" name="starr" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/scala-build.iml.SAMPLE b/src/intellij/scala-build.iml.SAMPLE index 0232e9e576..b8f066a2ef 100644 --- a/src/intellij/scala-build.iml.SAMPLE +++ b/src/intellij/scala-build.iml.SAMPLE @@ -1,109 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<module external.linked.project.id="scalaz-build" external.linked.project.path="$MODULE_DIR$/../../project" external.root.project.path="$MODULE_DIR$/../.." external.system.id="SBT" sbt.imports="sbt._, Keys._, dsl._, _root_.com.typesafe.sbt.SbtPgp.autoImport._, _root_.sbt.plugins.IvyPlugin, _root_.sbt.plugins.JvmPlugin, _root_.sbt.plugins.CorePlugin, _root_.sbt.plugins.JUnitXmlReportPlugin, _root_.com.typesafe.sbt.SbtPgp" sbt.resolvers="https://repo1.maven.org/maven2/|maven|public, /Users/jason/.ivy2/cache|ivy|Local cache" type="SBT_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="false"> - <output url="file://$MODULE_DIR$/../../project/target/idea-classes" /> - <output-test url="file://$MODULE_DIR$/../../project/target/idea-test-classes" /> +<module external.linked.project.id="scala-build" external.linked.project.path="$MODULE_DIR$/../../project" external.root.project.path="$MODULE_DIR$/../.." external.system.id="SBT" sbt.imports="sbt._, Keys._, dsl._, _root_.sbt.plugins.IvyPlugin, _root_.sbt.plugins.JvmPlugin, _root_.sbt.plugins.CorePlugin, _root_.sbt.plugins.JUnitXmlReportPlugin" sbt.resolvers="https://repo1.maven.org/maven2/|maven|public, https://oss.sonatype.org/content/repositories/snapshots|maven|sonatype-snapshots, https://scala-ci.typesafe.com/artifactory/scala-release-temp/|maven|private-repo, $USER_HOME$/.ivy2/cache|ivy|Local cache" type="SBT_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$/../../project"> <sourceFolder url="file://$MODULE_DIR$/../../project" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/../../project/target/scala-2.10/sbt-0.13/src_managed/main" isTestSource="false" /> + <excludeFolder url="file://$MODULE_DIR$/../../project/project/project/target" /> <excludeFolder url="file://$MODULE_DIR$/../../project/project/target" /> - <excludeFolder url="file://$MODULE_DIR$/../../project/target" /> + <excludeFolder url="file://$MODULE_DIR$/../../project/target/config-classes" /> + <excludeFolder url="file://$MODULE_DIR$/../../project/target/resolution-cache" /> + <excludeFolder url="file://$MODULE_DIR$/../../project/target/scala-2.10/classes" /> + <excludeFolder url="file://$MODULE_DIR$/../../project/target/scala-2.10/sbt-0.13/classes" /> + <excludeFolder url="file://$MODULE_DIR$/../../project/target/streams" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module-library"> - <library name="SBT: sbt-and-plugins"> - <CLASSES> - <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.commons/commons-lang3/jars/commons-lang3-3.3.2.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.pantsbuild/jarjar/jars/jarjar-1.6.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.6.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.6.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.ow2.asm/asm/jars/asm-5.0.4.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.ow2.asm/asm-commons/jars/asm-commons-5.0.4.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.ow2.asm/asm-tree/jars/asm-tree-5.0.4.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.maven/maven-plugin-api/jars/maven-plugin-api-3.3.3.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.maven/maven-model/jars/maven-model-3.3.3.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.codehaus.plexus/plexus-utils/jars/plexus-utils-3.0.20.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.maven/maven-artifact/jars/maven-artifact-3.3.3.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.sisu/org.eclipse.sisu.plexus/eclipse-plugins/org.eclipse.sisu.plexus-0.3.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/javax.enterprise/cdi-api/jars/cdi-api-1.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/javax.annotation/jsr250-api/jars/jsr250-api-1.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/javax.inject/javax.inject/jars/javax.inject-1.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.sisu/org.eclipse.sisu.inject/eclipse-plugins/org.eclipse.sisu.inject-0.3.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.codehaus.plexus/plexus-component-annotations/jars/plexus-component-annotations-1.5.5.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.codehaus.plexus/plexus-classworlds/bundles/plexus-classworlds-2.5.2.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/biz.aQute.bnd/biz.aQute.bnd/jars/biz.aQute.bnd-2.4.1.jar!/" /> - <root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.5/lib/scala-library.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/sbt/jars/sbt-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main/jars/main-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/actions/jars/actions-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classpath/jars/classpath-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.5/lib/scala-compiler.jar!/" /> - <root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.5/lib/scala-reflect.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/interface/jars/interface-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/io/jars/io-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/control/jars/control-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/launcher-interface/jars/launcher-interface-1.0.0-M1.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/completion/jars/completion-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/collections/jars/collections-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/api/jars/api-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-integration/jars/compiler-integration-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/incremental-compiler/jars/incremental-compiler-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logging/jars/logging-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/process/jars/process-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/relation/jars/relation-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compile/jars/compile-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classfile/jars/classfile-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/persist/jars/persist-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-tools.sbinary/sbinary_2.10/jars/sbinary_2.10-0.4.2.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-ivy-integration/jars/compiler-ivy-integration-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/ivy/jars/ivy-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cross/jars/cross-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt.ivy/ivy/jars/ivy-2.3.0-sbt-c5d1b95fdcc1e1007740ffbecf4eb07abc51ec93.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/com.jcraft/jsch/jars/jsch-0.1.46.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/serialization_2.10/jars/serialization_2.10-0.1.1.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-pickling_2.10/jars/scala-pickling_2.10-0.10.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scalamacros/quasiquotes_2.10/jars/quasiquotes_2.10-2.0.1.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.json4s/json4s-core_2.10/jars/json4s-core_2.10-3.2.10.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.json4s/json4s-ast_2.10/jars/json4s-ast_2.10-3.2.10.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/com.thoughtworks.paranamer/paranamer/jars/paranamer-2.6.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.spire-math/jawn-parser_2.10/jars/jawn-parser_2.10-0.6.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.spire-math/json4s-support_2.10/jars/json4s-support_2.10-0.6.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/run/jars/run-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/task-system/jars/task-system-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tasks/jars/tasks-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tracking/jars/tracking-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cache/jars/cache-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/testing/jars/testing-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-agent/jars/test-agent-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main-settings/jars/main-settings-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/apply-macro/jars/apply-macro-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/command/jars/command-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logic/jars/logic-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-interface/jars/compiler-interface-bin-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-interface/jars/compiler-interface-src-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_8_2/jars/compiler-interface-bin-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_9_2/jars/compiler-interface-bin-0.13.11.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_9_3/jars/compiler-interface-bin-0.13.11.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main/srcs/main-0.13.11-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang/scala-library/srcs/scala-library-2.10.5-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang/scala-reflect/srcs/scala-reflect-2.10.5-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang/scala-compiler/srcs/scala-compiler-2.10.5-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/actions/srcs/actions-0.13.11-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/sbt/srcs/sbt-0.13.11-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/run/srcs/run-0.13.11-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/srcs/test-interface-1.0-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/testing/srcs/testing-0.13.11-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tasks/srcs/tasks-0.13.11-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/ivy/srcs/ivy-0.13.11-sources.jar!/" /> - <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/completion/srcs/completion-0.13.11-sources.jar!/" /> - </SOURCES> - </library> - </orderEntry> + <orderEntry type="library" name="scala-build-deps" level="project" /> </component> </module> diff --git a/src/intellij/scala.iml.SAMPLE b/src/intellij/scala.iml.SAMPLE index 9e8718dd45..f1b2938016 100644 --- a/src/intellij/scala.iml.SAMPLE +++ b/src/intellij/scala.iml.SAMPLE @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> <content url="file://$MODULE_DIR$/../.."> <excludeFolder url="file://$MODULE_DIR$/../../build" /> + <excludeFolder url="file://$MODULE_DIR$/../../build-sbt" /> + <excludeFolder url="file://$MODULE_DIR$/../../target" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> diff --git a/src/intellij/scala.ipr.SAMPLE b/src/intellij/scala.ipr.SAMPLE index 420f559097..06a154b7cb 100644 --- a/src/intellij/scala.ipr.SAMPLE +++ b/src/intellij/scala.ipr.SAMPLE @@ -20,6 +20,9 @@ </annotationProcessing> </component> <component name="CopyrightManager" default="" /> + <component name="Encoding"> + <file url="PROJECT" charset="UTF-8" /> + </component> <component name="EntryPointsManager"> <entry_points version="2.0" /> </component> @@ -39,21 +42,22 @@ <module fileurl="file://$PROJECT_DIR$/compiler.iml" filepath="$PROJECT_DIR$/compiler.iml" /> <module fileurl="file://$PROJECT_DIR$/forkjoin.iml" filepath="$PROJECT_DIR$/forkjoin.iml" /> <module fileurl="file://$PROJECT_DIR$/interactive.iml" filepath="$PROJECT_DIR$/interactive.iml" /> + <module fileurl="file://$PROJECT_DIR$/junit.iml" filepath="$PROJECT_DIR$/junit.iml" /> <module fileurl="file://$PROJECT_DIR$/library.iml" filepath="$PROJECT_DIR$/library.iml" /> <module fileurl="file://$PROJECT_DIR$/manual.iml" filepath="$PROJECT_DIR$/manual.iml" /> <module fileurl="file://$PROJECT_DIR$/partest-extras.iml" filepath="$PROJECT_DIR$/partest-extras.iml" /> <module fileurl="file://$PROJECT_DIR$/partest-javaagent.iml" filepath="$PROJECT_DIR$/partest-javaagent.iml" /> <module fileurl="file://$PROJECT_DIR$/reflect.iml" filepath="$PROJECT_DIR$/reflect.iml" /> <module fileurl="file://$PROJECT_DIR$/repl.iml" filepath="$PROJECT_DIR$/repl.iml" /> + <module fileurl="file://$PROJECT_DIR$/repl-jline.iml" filepath="$PROJECT_DIR$/repl-jline.iml" /> <module fileurl="file://$PROJECT_DIR$/scala.iml" filepath="$PROJECT_DIR$/scala.iml" /> <module fileurl="file://$PROJECT_DIR$/scala-build.iml" filepath="$PROJECT_DIR$/scala-build.iml" /> <module fileurl="file://$PROJECT_DIR$/scaladoc.iml" filepath="$PROJECT_DIR$/scaladoc.iml" /> <module fileurl="file://$PROJECT_DIR$/scalap.iml" filepath="$PROJECT_DIR$/scalap.iml" /> <module fileurl="file://$PROJECT_DIR$/test.iml" filepath="$PROJECT_DIR$/test.iml" /> - <module fileurl="file://$PROJECT_DIR$/test-junit.iml" filepath="$PROJECT_DIR$/test-junit.iml" /> </modules> </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/../../out" /> </component> <component name="ScalaCompilerConfiguration"> @@ -66,64 +70,246 @@ <mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> </component> <component name="libraryTable"> - <library name="ant"> + <library name="compiler-deps"> + <CLASSES> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.12.1.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + <library name="interactive-deps"> + <CLASSES> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + <library name="junit-deps"> <CLASSES> - <root url="jar://$PROJECT_DIR$/../../lib/ant/ant.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.12.1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-partest_2.11/jars/scala-partest_2.11-1.0.13.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/com.googlecode.java-diff-utils/diffutils/jars/diffutils-1.3.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/junit/junit/jars/junit-4.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> - <library name="asm"> + <library name="manual-deps"> <CLASSES> - <root url="file://$PROJECT_DIR$/../../build/deps/asm" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> - <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/asm" recursive="false" /> </library> - <library name="junit"> + <library name="partest-extras-deps"> <CLASSES> - <root url="file://$PROJECT_DIR$/../../build/deps/junit" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.12.1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-partest_2.11/jars/scala-partest_2.11-1.0.13.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/com.googlecode.java-diff-utils/diffutils/jars/diffutils-1.3.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> - <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/junit" recursive="false" /> </library> - <library name="partest"> + <library name="partest-javaagent-deps"> <CLASSES> - <root url="file://$PROJECT_DIR$/../../build/deps/partest" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> - <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/partest" recursive="false" /> </library> <library name="repl-deps"> <CLASSES> - <root url="file://$PROJECT_DIR$/../../build/deps/repl" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + <library name="repl-jline-deps"> + <CLASSES> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.12.1.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + <library name="scala-build-deps"> + <CLASSES> + <root url="jar://$USER_HOME$/.ivy2/cache/scala_2.10/sbt_0.13/com.typesafe.sbt/sbt-git/jars/sbt-git-0.8.5.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.jgit/org.eclipse.jgit.pgm/jars/org.eclipse.jgit.pgm-3.7.0.201502260915-r.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/args4j/args4j/jars/args4j-2.0.12.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.commons/commons-compress/jars/commons-compress-1.6.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.tukaani/xz/jars/xz-1.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.jgit/org.eclipse.jgit.archive/jars/org.eclipse.jgit.archive-3.7.0.201502260915-r.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.jgit/org.eclipse.jgit/jars/org.eclipse.jgit-3.7.0.201502260915-r.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/com.jcraft/jsch/jars/jsch-0.1.50.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/com.googlecode.javaewah/JavaEWAH/bundles/JavaEWAH-0.7.9.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.httpcomponents/httpclient/jars/httpclient-4.1.3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.httpcomponents/httpcore/jars/httpcore-4.1.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/commons-logging/commons-logging/jars/commons-logging-1.1.1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.2.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.osgi/org.osgi.core/jars/org.osgi.core-4.3.1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.jgit/org.eclipse.jgit.ui/jars/org.eclipse.jgit.ui-3.7.0.201502260915-r.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.commons/commons-lang3/jars/commons-lang3-3.3.2.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.pantsbuild/jarjar/jars/jarjar-1.6.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.6.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.6.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.ow2.asm/asm/jars/asm-5.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.ow2.asm/asm-commons/jars/asm-commons-5.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.ow2.asm/asm-tree/jars/asm-tree-5.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.maven/maven-plugin-api/jars/maven-plugin-api-3.3.3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.maven/maven-model/jars/maven-model-3.3.3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.codehaus.plexus/plexus-utils/jars/plexus-utils-3.0.20.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.maven/maven-artifact/jars/maven-artifact-3.3.3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.sisu/org.eclipse.sisu.plexus/eclipse-plugins/org.eclipse.sisu.plexus-0.3.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/javax.enterprise/cdi-api/jars/cdi-api-1.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/javax.annotation/jsr250-api/jars/jsr250-api-1.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/javax.inject/javax.inject/jars/javax.inject-1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.eclipse.sisu/org.eclipse.sisu.inject/eclipse-plugins/org.eclipse.sisu.inject-0.3.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.codehaus.plexus/plexus-component-annotations/jars/plexus-component-annotations-1.5.5.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.codehaus.plexus/plexus-classworlds/bundles/plexus-classworlds-2.5.2.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/biz.aQute/bndlib/jars/bndlib-1.50.0.jar!/" /> + <root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.6/lib/scala-library.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/sbt/jars/sbt-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main/jars/main-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/actions/jars/actions-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classpath/jars/classpath-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.6/lib/scala-compiler.jar!/" /> + <root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.6/lib/scala-reflect.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/interface/jars/interface-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/io/jars/io-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/control/jars/control-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/launcher-interface/jars/launcher-interface-1.0.0-M1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/completion/jars/completion-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/collections/jars/collections-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.13.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.fusesource.jansi/jansi/jars/jansi-1.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/api/jars/api-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classfile/jars/classfile-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logging/jars/logging-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/process/jars/process-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-integration/jars/compiler-integration-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/incremental-compiler/jars/incremental-compiler-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/relation/jars/relation-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compile/jars/compile-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/persist/jars/persist-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-tools.sbinary/sbinary_2.10/jars/sbinary_2.10-0.4.2.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-ivy-integration/jars/compiler-ivy-integration-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/ivy/jars/ivy-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cross/jars/cross-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt.ivy/ivy/jars/ivy-2.3.0-sbt-2cc8d2761242b072cedb0a04cb39435c4fa24f9a.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/serialization_2.10/jars/serialization_2.10-0.1.2.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-pickling_2.10/jars/scala-pickling_2.10-0.10.1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scalamacros/quasiquotes_2.10/jars/quasiquotes_2.10-2.0.1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.json4s/json4s-core_2.10/jars/json4s-core_2.10-3.2.10.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.json4s/json4s-ast_2.10/jars/json4s-ast_2.10-3.2.10.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/com.thoughtworks.paranamer/paranamer/jars/paranamer-2.6.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.spire-math/jawn-parser_2.10/jars/jawn-parser_2.10-0.6.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.spire-math/json4s-support_2.10/jars/json4s-support_2.10-0.6.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/run/jars/run-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/task-system/jars/task-system-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tasks/jars/tasks-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tracking/jars/tracking-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cache/jars/cache-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/testing/jars/testing-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-agent/jars/test-agent-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main-settings/jars/main-settings-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/apply-macro/jars/apply-macro-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/command/jars/command-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logic/jars/logic-0.13.11.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-interface/jars/compiler-interface-0.13.11.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> - <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/repl" recursive="false" /> </library> <library name="scaladoc-deps"> <CLASSES> - <root url="file://$PROJECT_DIR$/../../build/deps/scaladoc" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-partest_2.11/jars/scala-partest_2.11-1.0.13.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/com.googlecode.java-diff-utils/diffutils/jars/diffutils-1.3.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + <library name="scalap-deps"> + <CLASSES> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> - <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/scaladoc" recursive="false" /> </library> <library name="starr" type="Scala"> <properties> + <option name="languageLevel" value="Scala_2_12" /> <compiler-classpath> - <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-compiler-#starr-version#.jar" /> - <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-library-#starr-version#.jar" /> - <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-reflect-#starr-version#.jar" /> + <root url="file://$USER_HOME$/.sbt/boot/scala-2.11.8/lib/scala-library.jar" /> + <root url="file://$USER_HOME$/.sbt/boot/scala-2.11.8/lib/scala-compiler.jar" /> + <root url="file://$USER_HOME$/.sbt/boot/scala-2.11.8/lib/scala-reflect.jar" /> + <root url="file://$USER_HOME$/.sbt/boot/scala-2.11.8/lib/scala-parser-combinators_2.11.jar" /> + <root url="file://$USER_HOME$/.sbt/boot/scala-2.11.8/lib/jline.jar" /> + <root url="file://$USER_HOME$/.sbt/boot/scala-2.11.8/lib/scala-xml_2.11.jar" /> </compiler-classpath> </properties> <CLASSES /> <JAVADOC /> <SOURCES /> </library> + <library name="test-deps"> + <CLASSES> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant/jars/ant-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.0.4-scala-3.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.12.1.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang.modules/scala-partest_2.11/jars/scala-partest_2.11-1.0.13.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/com.googlecode.java-diff-utils/diffutils/jars/diffutils-1.3.0.jar!/" /> + <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> </component> -</project> +</project>
\ No newline at end of file diff --git a/src/intellij/scaladoc.iml.SAMPLE b/src/intellij/scaladoc.iml.SAMPLE index 6e6d98b396..9ab94c1bbb 100644 --- a/src/intellij/scaladoc.iml.SAMPLE +++ b/src/intellij/scaladoc.iml.SAMPLE @@ -1,19 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/scaladoc" /> + <output-test url="file://$MODULE_DIR$/../../out/test/scaladoc" /> <exclude-output /> <content url="file://$MODULE_DIR$/../scaladoc"> <sourceFolder url="file://$MODULE_DIR$/../scaladoc" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="library" /> <orderEntry type="module" module-name="reflect" /> - <orderEntry type="library" name="starr" level="project" /> + <orderEntry type="module" module-name="compiler" /> <orderEntry type="library" name="scaladoc-deps" level="project" /> - <orderEntry type="library" name="ant" level="project" /> - <orderEntry type="library" name="partest" level="project" /> - <orderEntry type="library" name="asm" level="project" /> + <orderEntry type="library" name="starr" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/scalap.iml.SAMPLE b/src/intellij/scalap.iml.SAMPLE index 665aac07f8..dfe6892bd3 100644 --- a/src/intellij/scalap.iml.SAMPLE +++ b/src/intellij/scalap.iml.SAMPLE @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/../../build/quick/classes/scalap" /> + <output-test url="file://$MODULE_DIR$/../../out/test/scalap" /> <exclude-output /> <content url="file://$MODULE_DIR$/../scalap"> <sourceFolder url="file://$MODULE_DIR$/../scalap" isTestSource="false" /> @@ -10,6 +12,7 @@ <orderEntry type="module" module-name="library" /> <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="reflect" /> + <orderEntry type="library" name="scalap-deps" level="project" /> <orderEntry type="library" name="starr" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/setup.sh b/src/intellij/setup.sh deleted file mode 100755 index 251f717829..0000000000 --- a/src/intellij/setup.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# -# Generates IntelliJ IDEA project files based on the checked-in samples. -# - -set -e -export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -echo "About to delete .ipr and .iml files and replace with the .SAMPLE files. Press enter to continue or CTRL-C to cancel." -read - -for f in "$SCRIPT_DIR"/*.SAMPLE; do - g=${f%.SAMPLE} - cp $f $g -done - -STARR_VERSION="`cat $SCRIPT_DIR/../../versions.properties | grep 'starr.version' | awk '{split($0,a,"="); print a[2]}'`" -sed "s/#starr-version#/$STARR_VERSION/g" $SCRIPT_DIR/scala.ipr.SAMPLE > $SCRIPT_DIR/scala.ipr diff --git a/src/intellij/test.iml.SAMPLE b/src/intellij/test.iml.SAMPLE index 5047967721..0253b539e7 100644 --- a/src/intellij/test.iml.SAMPLE +++ b/src/intellij/test.iml.SAMPLE @@ -7,16 +7,15 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="actors" /> - <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="forkjoin" /> - <orderEntry type="module" module-name="interactive" /> <orderEntry type="module" module-name="library" /> - <orderEntry type="module" module-name="partest-extras" /> + <orderEntry type="module" module-name="actors" /> <orderEntry type="module" module-name="reflect" /> + <orderEntry type="module" module-name="compiler" /> <orderEntry type="module" module-name="repl" /> - <orderEntry type="library" name="partest" level="project" /> - <orderEntry type="library" name="scaladoc-deps" level="project" /> - <orderEntry type="library" name="asm" level="project" /> + <orderEntry type="module" module-name="interactive" /> + <orderEntry type="module" module-name="scaladoc" /> + <orderEntry type="module" module-name="partest-extras" /> + <orderEntry type="library" name="test-deps" level="project" /> </component> </module>
\ No newline at end of file diff --git a/src/intellij/update.sh b/src/intellij/update.sh deleted file mode 100755 index eb6fea782f..0000000000 --- a/src/intellij/update.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Updates the .SAMPLE files with the current project files. -# - -set -e -export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" - -echo "About to create overwrite the .ipr.SAMPLE and .iml.SAMPLE files with the current project files. Press enter to continue or CTRL-C to cancel." -read - -for f in "$SCRIPT_DIR"/*.{iml,ipr}; do - cp $f $f.SAMPLE -done - -for f in "$SCRIPT_DIR"/*.SAMPLE; do - g=${f%.SAMPLE} - if [[ ! -f $g ]]; then - echo "Stale sample file, deleting $f" - rm $f - fi -done diff --git a/src/library/scala/concurrent/impl/Promise.scala b/src/library/scala/concurrent/impl/Promise.scala index b15601058e..6d2fc5c87c 100644 --- a/src/library/scala/concurrent/impl/Promise.scala +++ b/src/library/scala/concurrent/impl/Promise.scala @@ -19,6 +19,10 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer private[concurrent] trait Promise[T] extends scala.concurrent.Promise[T] with scala.concurrent.Future[T] { def future: this.type = this + override def toString: String = value match { + case Some(result) => "Future("+result+")" + case None => "Future(<not completed>)" + } } /* Precondition: `executor` is prepared, i.e., `executor` has been returned from invocation of `prepare` on some other `ExecutionContext`. diff --git a/src/repl/scala/tools/nsc/interpreter/Imports.scala b/src/repl/scala/tools/nsc/interpreter/Imports.scala index 5742c1d0d8..f04e2e808c 100644 --- a/src/repl/scala/tools/nsc/interpreter/Imports.scala +++ b/src/repl/scala/tools/nsc/interpreter/Imports.scala @@ -183,7 +183,7 @@ trait Imports { case _ => val valName = req.lineRep.packageName + req.lineRep.readName if (!tempValLines.contains(req.lineRep.lineId)) { - code.append(s"val $valName = $objName\n") + code.append(s"val $valName: ${objName}.type = $objName\n") tempValLines += req.lineRep.lineId } code.append(s"import $valName${req.accessPath}.`$imv`;\n") diff --git a/src/repl/scala/tools/nsc/interpreter/ReplStrings.scala b/src/repl/scala/tools/nsc/interpreter/ReplStrings.scala index 1664546cab..bf7508cb4e 100644 --- a/src/repl/scala/tools/nsc/interpreter/ReplStrings.scala +++ b/src/repl/scala/tools/nsc/interpreter/ReplStrings.scala @@ -11,13 +11,21 @@ import scala.reflect.internal.Chars trait ReplStrings { /** Convert a string into code that can recreate the string. * This requires replacing all special characters by escape - * codes. It does not add the surrounding " marks. */ + * codes. It does not add the surrounding " marks. + */ def string2code(str: String): String = { val res = new StringBuilder for (c <- str) c match { - case '"' | '\'' | '\\' => res += '\\' ; res += c - case _ if c.isControl => res ++= Chars.char2uescape(c) - case _ => res += c + case '"' => res ++= """\"""" + case '\'' => res ++= """\'""" + case '\\' => res ++= """\\""" + case '\b' => res ++= """\b""" + case '\t' => res ++= """\t""" + case '\n' => res ++= """\n""" + case '\f' => res ++= """\f""" + case '\r' => res ++= """\r""" + case _ if c.isControl => res ++= Chars.char2uescape(c) + case _ => res += c } res.toString } diff --git a/test/files/jvm/future-spec/FutureTests.scala b/test/files/jvm/future-spec/FutureTests.scala index a290af9cd3..efe9c59d7a 100644 --- a/test/files/jvm/future-spec/FutureTests.scala +++ b/test/files/jvm/future-spec/FutureTests.scala @@ -24,7 +24,7 @@ class FutureTests extends MinimalScalaTest { "A future with custom ExecutionContext" should { "shouldHandleThrowables" in { val ms = new mutable.HashSet[Throwable] with mutable.SynchronizedSet[Throwable] - implicit val ec = scala.concurrent.ExecutionContext.fromExecutor(new scala.concurrent.forkjoin.ForkJoinPool(), { + implicit val ec = scala.concurrent.ExecutionContext.fromExecutorService(new scala.concurrent.forkjoin.ForkJoinPool(), { t => ms += t }) @@ -64,7 +64,7 @@ class FutureTests extends MinimalScalaTest { Await.ready(waiting, 2000 millis) ms.size mustBe (4) - //FIXME should check + ec.shutdownNow() } } @@ -543,6 +543,22 @@ class FutureTests extends MinimalScalaTest { Await.ready(f, defaultTimeout).value.get.toString mustBe expected.toString } + "should have a decent toString representation" in { + val i = scala.concurrent.forkjoin.ThreadLocalRandom.current.nextInt() + val e = new Exception(i.toString) + val successString = "Future(Success("+i+"))" + val failureString = "Future(Failure("+e+"))" + val notCompletedString = "Future(<not completed>)" + + Future.successful(i).toString mustBe successString + Future.failed[Int](e).toString mustBe failureString + Promise[Int]().toString mustBe notCompletedString + Promise[Int]().success(i).toString mustBe successString + Promise[Int]().failure(e).toString mustBe failureString + Await.ready(Future(i)(ExecutionContext.global), defaultTimeout).toString mustBe successString + Await.ready(Future(throw e)(ExecutionContext.global), defaultTimeout).toString mustBe failureString + } + } } diff --git a/test/files/run/repl-no-uescape.check b/test/files/run/repl-no-uescape.check new file mode 100644 index 0000000000..01eeafaa70 --- /dev/null +++ b/test/files/run/repl-no-uescape.check @@ -0,0 +1,5 @@ + +scala> object A +defined object A + +scala> :quit diff --git a/test/files/run/repl-no-uescape.scala b/test/files/run/repl-no-uescape.scala new file mode 100644 index 0000000000..1865109ebf --- /dev/null +++ b/test/files/run/repl-no-uescape.scala @@ -0,0 +1,31 @@ +import scala.tools.partest.ReplTest +import scala.tools.nsc.Settings + +/* +scala> object A +<console>:10: error: invalid escape character ++ "defined object " + "A" + "\u000A" + +Under -Dscala.color=true control chars are common + $eval.this.$print = { + $line2.$read.$iw.$iw; + "\033[1m\033[34mres1\033[0m: \033[1m\033[32mInt\033[0m = ".+(scala.runtime.ScalaRunTime.replStringOf($line2.$read.$iw.$iw.res1, 1000)) + }; + +$ skala -Dscala.color=true -Xno-uescape +Welcome to Scala 2.11.9-20160323-163638-1fcfdd8c8b (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_60). +Type in expressions for evaluation. Or try :help. + +scala> 42 +<console>:10: error: invalid escape character + + "\u001B[1m\u001B[34mres0\u001B[0m: \u001B[1m\u001B[32mInt\u001B[0m = " + scala.runtime.ScalaRunTime.replStringOf(res0, 1000) + */ +object Test extends ReplTest { + override def transformSettings(settings: Settings): Settings = { + settings.nouescape.value = true + settings + } + def code = """ +object A + """ +} diff --git a/test/files/run/repl-paste-6.check b/test/files/run/repl-paste-6.check new file mode 100755 index 0000000000..efcea9274f --- /dev/null +++ b/test/files/run/repl-paste-6.check @@ -0,0 +1,17 @@ + +scala> :paste < EOF +// Entering paste mode (EOF to finish) + +case class C(i: Int) +val c = C(42) +EOF + +// Exiting paste mode, now interpreting. + +defined class C +c: C = C(42) + +scala> val d: C = c // shew +d: C = C(42) + +scala> :quit diff --git a/test/files/run/repl-paste-6.scala b/test/files/run/repl-paste-6.scala new file mode 100644 index 0000000000..8040d24f8a --- /dev/null +++ b/test/files/run/repl-paste-6.scala @@ -0,0 +1,23 @@ + +import scala.tools.partest.ReplTest +import scala.tools.nsc.Settings + + +/* + * Add // show to witness: + * val $line3$read: $line3.$read.INSTANCE.type = $line3.$read.INSTANCE; + */ +object Test extends ReplTest { + override def transformSettings(settings: Settings): Settings = { + settings.Yreplclassbased.value = true + settings + } + def code = + """ +:paste < EOF +case class C(i: Int) +val c = C(42) +EOF +val d: C = c // shew + """ +} diff --git a/versions.properties b/versions.properties index 7883f0e3c7..afea93f666 100644 --- a/versions.properties +++ b/versions.properties @@ -25,7 +25,7 @@ scala.binary.version=2.11 scala.full.version=2.11.8 # external modules shipped with distribution, as specified by scala-library-all's pom -scala-xml.version.number=1.0.4 +scala-xml.version.number=1.0.5 scala-parser-combinators.version.number=1.0.4 scala-continuations-plugin.version.number=1.0.2 scala-continuations-library.version.number=1.0.2 |