diff options
Diffstat (limited to 'src/build')
-rw-r--r-- | src/build/genprod.scala | 27 | ||||
-rw-r--r-- | src/build/maven/maven-deploy.xml | 9 | ||||
-rw-r--r-- | src/build/pack.xml | 3 |
3 files changed, 22 insertions, 17 deletions
diff --git a/src/build/genprod.scala b/src/build/genprod.scala index 9e5b6810c1..a43b5e02c7 100644 --- a/src/build/genprod.scala +++ b/src/build/genprod.scala @@ -97,7 +97,7 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz */ object FunctionZero extends Function(0) { override def genprodString = "\n// genprod generated these sources at: " + new java.util.Date() override def covariantSpecs = "@specialized " - override def descriptiveComment = functionNTemplate.format("javaVersion", "anonfun0", + override def descriptiveComment = " " + functionNTemplate.format("javaVersion", "anonfun0", """ * val javaVersion = () => sys.props("java.version") * @@ -111,10 +111,10 @@ object FunctionZero extends Function(0) { object FunctionOne extends Function(1) { override def classAnnotation = "@annotation.implicitNotFound(msg = \"No implicit view available from ${T1} => ${R}.\")\n" - override def contravariantSpecs = "@specialized(scala.Int, scala.Long, scala.Float, scala.Double) " - override def covariantSpecs = "@specialized(scala.Unit, scala.Boolean, scala.Int, scala.Float, scala.Long, scala.Double) " + override def contravariantSpecs = "@specialized(scala.Int, scala.Long, scala.Float, scala.Double, scala.AnyRef) " + override def covariantSpecs = "@specialized(scala.Unit, scala.Boolean, scala.Int, scala.Float, scala.Long, scala.Double, scala.AnyRef) " - override def descriptiveComment = functionNTemplate.format("succ", "anonfun1", + override def descriptiveComment = " " + functionNTemplate.format("succ", "anonfun1", """ * val succ = (x: Int) => x + 1 * val anonfun1 = new Function1[Int, Int] { @@ -146,7 +146,7 @@ object FunctionTwo extends Function(2) { override def contravariantSpecs = "@specialized(scala.Int, scala.Long, scala.Double) " override def covariantSpecs = "@specialized(scala.Unit, scala.Boolean, scala.Int, scala.Float, scala.Long, scala.Double) " - override def descriptiveComment = functionNTemplate.format("max", "anonfun2", + override def descriptiveComment = " " + functionNTemplate.format("max", "anonfun2", """ * val max = (x: Int, y: Int) => if (x < y) y else x * @@ -175,14 +175,20 @@ class Function(val i: Int) extends Group("Function") with Arity { * * {{{ * object Main extends App { %s } - * }}}""" + * }}} + * + * Note that `Function1` does not define a total function, as might + * be suggested by the existence of [[scala.PartialFunction]]. The only + * distinction between `Function1` and `PartialFunction` is that the + * latter can specify inputs which it will not handle. + """ def toStr() = "\"" + ("<function%d>" format i) + "\"" def apply() = { <file name={fileName}>{header} /** A function of {i} parameter{s}. - * {descriptiveComment} + *{descriptiveComment} */ {classAnnotation}trait {className}{contraCoArgs} extends AnyRef {{ self => /** Apply the body of this function to the argument{s}. @@ -211,12 +217,11 @@ class Function(val i: Int) extends Group("Function") with Arity { ) // f(x1,x2,x3,x4,x5,x6) == (f.curried)(x1)(x2)(x3)(x4)(x5)(x6) - def curryComment = { """ - /** Creates a curried version of this function. + def curryComment = { +"""/** Creates a curried version of this function. * * @return a function `f` such that `f%s == apply%s` - */ -""".format(xdefs map ("(" + _ + ")") mkString, commaXs) + */""".format(xdefs map ("(" + _ + ")") mkString, commaXs) } def tupleMethod = { diff --git a/src/build/maven/maven-deploy.xml b/src/build/maven/maven-deploy.xml index 9fddca3c73..679f45ab54 100644 --- a/src/build/maven/maven-deploy.xml +++ b/src/build/maven/maven-deploy.xml @@ -9,15 +9,12 @@ <!-- Pull in properties from build --> <property file="build.properties" /> <!-- Initialize specific properties --> - <!--<property name="remote.snapshot.repository" value="http://scala-tools.org:8081/nexus/content/repositories/snapshots" /> - <property name="remote.release.repository" value="http://scala-tools.org:8081/nexus/content/repositories/releases" />--> - - <property name="remote.snapshot.repository" value="http://nexus.scala-tools.org/content/repositories/snapshots" /> - <property name="remote.release.repository" value="http://nexus.scala-tools.org/content/repositories/releases" /> + <property name="remote.snapshot.repository" value="https://oss.sonatype.org/content/repositories/snapshots" /> + <property name="remote.release.repository" value="https://oss.sonatype.org/service/local/staging/deploy/maven2" /> <property name="local.snapshot.repository" value="${user.home}/.m2/repository" /> <property name="local.release.repository" value="${user.home}/.m2/repository" /> - <property name="repository.credentials.id" value="scala-tools.org" /> + <property name="repository.credentials.id" value="sonatype-nexus" /> <property name="settings.file" value="${user.home}/.m2/settings.xml" /> <echo>Using server[${repository.credentials.id}] for maven repository credentials. diff --git a/src/build/pack.xml b/src/build/pack.xml index 05e49e5e81..d022ac3f05 100644 --- a/src/build/pack.xml +++ b/src/build/pack.xml @@ -11,6 +11,9 @@ PROPERTIES ============================================================================ --> <property name="sbaz.universe" value="http://www.scala-lang.org/downloads/packages"/> + <property file="${basedir}/build.number.maven"/> + <!-- the maven stuff requires version.major, version.minor and version.patch properties. + the "get-scala-revision" script only returns "version.number" --> <!-- =========================================================================== MAIN DISTRIBUTION PACKAGING |