summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-04-18 15:09:52 +0000
committermichelou <michelou@epfl.ch>2007-04-18 15:09:52 +0000
commitd3529d9a6e03f8562138ecb5844ef9ff6bb66b06 (patch)
treecdacd10d8c4dfdb317e001369414d30eee1c1fec
parent2b00a2580c15575378ee65a6894d6803bc4d3061 (diff)
downloadscala-d3529d9a6e03f8562138ecb5844ef9ff6bb66b06.tar.gz
scala-d3529d9a6e03f8562138ecb5844ef9ff6bb66b06.tar.bz2
scala-d3529d9a6e03f8562138ecb5844ef9ff6bb66b06.zip
fixed bug #1054, added svn props
-rw-r--r--src/compiler/scala/tools/nsc/doc/DocDriver.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/DocGenerator.scala3
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelAdditions.scala12
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelExtractor.scala19
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelFrames.scala28
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelToXML.scala9
-rwxr-xr-xtest/scala2-nightly-test.scm1
-rwxr-xr-xtest/scala2-nightly-test.sh24
8 files changed, 70 insertions, 28 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/DocDriver.scala b/src/compiler/scala/tools/nsc/doc/DocDriver.scala
index e527c558cf..89e5be0b77 100644
--- a/src/compiler/scala/tools/nsc/doc/DocDriver.scala
+++ b/src/compiler/scala/tools/nsc/doc/DocDriver.scala
@@ -2,7 +2,7 @@
* Copyright 2007-2008 LAMP/EPFL
* @author Sean McDirmid
*/
-// $Id: $
+// $Id$
package scala.tools.nsc.doc;
diff --git a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
index ac1f48483b..6933151770 100644
--- a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
+++ b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
@@ -1177,7 +1177,8 @@ abstract class DocGenerator extends Models {
def sym = definitions.getClass("scala.runtime.BoxedNumber")
def descr = boxedValDescr(sym)
}
- val rsrcdir = "scala/tools/nsc/doc/".replace('/', File.separatorChar)
+ // The name of a resource is a '/'-separated path name that identifies the resource.
+ val rsrcdir = "scala/tools/nsc/doc/"
for (val base <- List("style.css", "script.js")) {
try {
val in = loader.getResourceAsStream(rsrcdir + base)
diff --git a/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala b/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
index cba6de48b8..02dcbfda40 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
@@ -1,5 +1,15 @@
-package scala.tools.nsc.doc;
+/* NSC -- new Scala compiler
+ * Copyright 2007-2008 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
+package scala.tools.nsc.doc
+
+/**
+ * @author Sean McDirmid
+ * @version 1.0
+ */
class ModelAdditions(val global : Global) {
import global._;
import definitions._;
diff --git a/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala b/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
index 3ea636f02b..1cf4914081 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
@@ -1,11 +1,20 @@
-package scala.tools.nsc.doc;
-import scala.collection.jcl;
+/* NSC -- new Scala compiler
+ * Copyright 2007-2008 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
+
+package scala.tools.nsc.doc
+
+import scala.collection.jcl
import compat.Platform.{EOL => LINE_SEPARATOR}
-/** This class attempts to reverse engineer source code intent from compiler symbol objects
- * @author Sean McDirmid
- */
+/** This class attempts to reverse engineer source code intent from compiler
+ * symbol objects.
+ *
+ * @author Sean McDirmid
+ */
trait ModelExtractor {
val global : Global;
import global._;
diff --git a/src/compiler/scala/tools/nsc/doc/ModelFrames.scala b/src/compiler/scala/tools/nsc/doc/ModelFrames.scala
index 917895e1ef..392ea938f2 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelFrames.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelFrames.scala
@@ -1,9 +1,16 @@
-package scala.tools.nsc.doc;
+/* NSC -- new Scala compiler
+ * Copyright 2005-2007 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
-import compat.Platform.{EOL => LINE_SEPARATOR};
-import scala.xml._;
-import java.io.{File,FileWriter};
-import scala.collection.jcl;
+package scala.tools.nsc.doc
+
+import java.io.{File, FileWriter}
+
+import scala.collection.jcl
+import scala.compat.Platform.{EOL => LINE_SEPARATOR}
+import scala.xml._
/** This class provides HTML document framing functionality.
*
@@ -25,14 +32,14 @@ trait ModelFrames extends ModelExtractor {
def rootTitle = <div class="page-title"> Scala 2<br/>API Specification</div>;
def rootDesc = <p>This document is the API specification for Scala 2.</p>;
- final def hasLink(sym : global.Symbol) : Boolean = {
+ final def hasLink(sym: global.Symbol) : Boolean = {
if (sym == global.NoSymbol) false;
else if (hasLink0(sym)) true;
else {
hasLink(decode(sym.owner));
}
}
- def hasLink0(sym : global.Symbol) : Boolean = true;
+ def hasLink0(sym: global.Symbol): Boolean = true;
abstract class Frame extends UrlContext {
{ // just save.
@@ -131,7 +138,7 @@ trait ModelFrames extends ModelExtractor {
})
}
}
- protected def rootFor(sym : global.Symbol) = "";
+ protected def rootFor(sym: global.Symbol) = "";
private val doctitle: NodeSeq =
<div class="doctitle-larger">{load(documentTitle)}</div>;
@@ -300,8 +307,9 @@ trait ModelFrames extends ModelExtractor {
private val loader = getClass().getClassLoader()
def copyResources = {
- import java.io._;
- val rsrcdir = "scala/tools/nsc/doc/".replace('/', File.separatorChar)
+ import java.io._
+ // The name of a resource is a '/'-separated path name that identifies the resource.
+ val rsrcdir = "scala/tools/nsc/doc/"
for (val base <- List("style.css", "script.js")) {
try {
val in = loader.getResourceAsStream(rsrcdir + base)
diff --git a/src/compiler/scala/tools/nsc/doc/ModelToXML.scala b/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
index c43a215a22..cc4b7848b2 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
@@ -1,4 +1,11 @@
-package scala.tools.nsc.doc;
+/* NSC -- new Scala compiler
+ * Copyright 2007-2008 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
+
+package scala.tools.nsc.doc
+
import scala.xml._
/** This class has functionality to format source code models as XML blocks.
diff --git a/test/scala2-nightly-test.scm b/test/scala2-nightly-test.scm
index b56a5e2663..dd67459239 100755
--- a/test/scala2-nightly-test.scm
+++ b/test/scala2-nightly-test.scm
@@ -79,6 +79,7 @@ exec scsh -e main -s "$0" "$@"
(with-cwd scala-svn-module-name
(start-section "Creating small Scala distribution")
(fail-if-error (run (ant pack)))
+ (fail-if-error (run (ant docs.compiler)))
(start-section "Testing Scala compiler")
(fail-if-error
(run (./test/scalatest --color=none
diff --git a/test/scala2-nightly-test.sh b/test/scala2-nightly-test.sh
index 5af95b318d..281009fc88 100755
--- a/test/scala2-nightly-test.sh
+++ b/test/scala2-nightly-test.sh
@@ -1,28 +1,34 @@
#!/bin/sh
-if [ -z "$JAVA_VERSION" ]; then
- JAVA_VERSION=1.5
-fi
+[ -z "$JAVA_SDK" ] && JAVA_SDK=java
+[ -z "$JAVA_VERSION" ] && JAVA_VERSION=1.5
ANT_HOME=/home/linuxsoft/apps/ant
-JAVA_HOME=/home/linuxsoft/apps/java-$JAVA_VERSION
+JAVA_HOME=/home/linuxsoft/apps/$JAVA_SDK-$JAVA_VERSION
SCSH_HOME=/home/linuxsoft/apps/scsh-rh9
PATH=/usr/local/bin:/bin:/usr/bin:/usr/sbin
PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$SCSH_HOME/bin:$PATH
-ANT_OPTS="-Xms256M -Xmx512M"
+ANT_OPTS="-Xms512M -Xmx768M"
BUILD_DATE=`date +"%Y-%m-%d"`
-OUTPUT_DIR=~/scala-nightly-test/java-$JAVA_VERSION
-BUILD_DIR=$OUTPUT_DIR/$BUILD_DATE-scala2
-LATEST_DIR=$BUILD_DIR/scala/dists
+OUTPUT_DIR=~/scala-nightly-test/$JAVA_SDK-$JAVA_VERSION
+TARGET_DIR=$OUTPUT_DIR/$BUILD_DATE-scala2
+BUILD_DIR=$TARGET_DIR/scala/build
+LATEST_DIR=$TARGET_DIR/scala/dists
NIGHTLY_DIR=/home/linuxsoft/archives/scala/nightly
+[ -d "$OUTPUT_DIR" ] || mkdir -p "$OUTPUT_DIR"
+
env PATH="$PATH" ANT_OPTS="$ANT_OPTS" ~/bin/scala2-nightly-test.scm $OUTPUT_DIR
if [ -d "$LATEST_DIR" ] && [ `ls "$LATEST_DIR"/*.zip | wc -l` -gt 0 ]; then
(rm -rf $NIGHTLY_DIR && mkdir $NIGHTLY_DIR)
(cd $LATEST_DIR && cp *.tgz *.zip *.md5 *.sbp *.advert $NIGHTLY_DIR)
- (cd $BUILD_DIR && cp log-scala2 $NIGHTLY_DIR)
+ (cd $TARGET_DIR && cp log-scala2 $NIGHTLY_DIR)
+ (cd $NIGHTLY_DIR && mkdir scala && cd scala && tar xzf ../scala-*[^sources].tgz)
+fi
+if [ -d "$BUILD_DIR/api-compiler" ] && [ -d "$NIGHTLY_DIR/scala/doc/scala" ]; then
+ cp -r $BUILD_DIR/api-compiler $NIGHTLY_DIR/scala/doc/scala
fi