diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | build.number | 10 | ||||
-rwxr-xr-x | build.xml | 4 | ||||
-rwxr-xr-x | scripts/jobs/integrate/bootstrap | 305 | ||||
-rwxr-xr-x | scripts/jobs/validate/test | 2 | ||||
-rw-r--r-- | test/files/scalacheck/redblacktree.scala | 2 | ||||
-rwxr-xr-x | tools/binary-repo-lib.sh | 2 | ||||
-rw-r--r-- | versions.properties | 26 |
8 files changed, 213 insertions, 140 deletions
@@ -97,7 +97,7 @@ Once the `publish-core` task has completed on a commit, you can try it out in sb ``` $ sbt -> set resolvers += "pr" at "http://private-repo.typesafe.com/typesafe/scala-pr-validation-snapshots/" +> set resolvers += "pr" at "https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/" > set scalaVersion := "<milestone>-<sha7>-SNAPSHOT" > console ``` diff --git a/build.number b/build.number index 27d2d23041..f5c5adfc0f 100644 --- a/build.number +++ b/build.number @@ -1,9 +1,13 @@ -#Tue Sep 11 19:21:09 CEST 2007 +# The version number in this file should be the next un-released minor version, +# e.g., 2.11.7, 2.12.0, 2.12.1. It's used to determine version numbers for +# SNAPSHOT / nightly builds and local builds of source checkouts. + version.major=2 version.minor=11 version.patch=7 -# This is the -N part of a version. if it's 0, it's dropped from maven versions. + +# This is the -N part of a version (2.9.1-1). If it's 0, it's dropped from maven versions. It should not be used again. version.bnum=0 # To build a release, see scripts/jobs/scala-release-2.11.x-build -# (normally run by the eponymous job on scala-ci.typesafe.com).
\ No newline at end of file +# (normally run by the eponymous job on scala-ci.typesafe.com). @@ -506,9 +506,9 @@ TODO: <property name="sbt.lib.dir" value="${build-sbt.dir}/${sbt.latest.version}/lib"/> <property name="sbt.interface.jar" value="${sbt.lib.dir}/interface.jar"/> - <property name="sbt.interface.url" value="http://private-repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/${sbt.latest.version}/jars/interface.jar"/> + <property name="sbt.interface.url" value="http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/interface/${sbt.latest.version}/jars/interface.jar"/> <property name="sbt.interface.src.jar" value="${sbt.src.dir}/compiler-interface-src.jar"/> - <property name="sbt.interface.src.url" value="http://private-repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/${sbt.latest.version}/jars/compiler-interface-src.jar"/> + <property name="sbt.interface.src.url" value="http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/${sbt.latest.version}/jars/compiler-interface-src.jar"/> <!-- Additional command line arguments for scalac. They are added to all build targets --> diff --git a/scripts/jobs/integrate/bootstrap b/scripts/jobs/integrate/bootstrap index 7944ab3fd3..da2bde10ba 100755 --- a/scripts/jobs/integrate/bootstrap +++ b/scripts/jobs/integrate/bootstrap @@ -1,74 +1,87 @@ #!/bin/bash -e -# TODO: different scripts for the different phases -- usually we don't need to bootstrap the modules, -# since we can use the previous version of scala for STARR as well as for compiling the modules (assuming it's binary compatible) -# We should move away from the complicated bootstrap and set up our release schedule so we always have a previous build that satisfies these criteria. -# (Potentially trivially, by splitting up this script, and publishing locker as if it were a real release.) - -# requirements: -# sbtCmd must point to sbt from sbt-extras (this is the standard on the Scala jenkins, so we only support that one) -# - ~/.sonatype-curl that consists of user = USER:PASS -# - ~/.m2/settings.xml with credentials for sonatype - # <server> - # <id>private-repo</id> - # <username>jenkinside</username> - # <password></password> - # </server> -# - ~/.credentials (for sonatype) - # realm=Sonatype Nexus Repository Manager - # host=oss.sonatype.org - # user=lamp - # password= -# - ~/.credentials-private-repo for private-repo.typesafe.com, as follows: - # realm=Artifactory Realm - # host=private-repo.typesafe.com - # user=jenkinside - # password= -# - ~/.sbt/0.13/plugins/gpg.sbt with: -# addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1") - -# Modus operandi: -# -# Determine Scala version as: -# -# $SCALA_VER_BASE$SCALA_VER_SUFFIX (if former variable is set) -# By parsing the tag (if HEAD is tagged as v$base$suffix) -# By parsing build.number for the base version, suffixing with -$sha-nightly -# Serialize these versions to jenkins.properties, which are passed downstream to scala-release-2.11.x-dist. -# This also removes the need to tag scala/scala-dist (not possible for nightlies, still encouraged for releases, but not a hard requirement). -# -# Determine Module Versions -# -# When running in "versions.properties" mode (the default), derive tags from these versions and build, publishing only those modules that are not available yet. -# Otherwise, build HEAD for all modules, derive a -nightly version for them. -# Bootstrap: -# -# Build minimal core of Scala as this version (aka locker), publish to private-repo -# Build modules required to bootstrap, publish to private-repo -# Build Scala using the previously built core and bootstrap modules, publish to private-repo This overwrites the minimal core on private-repo -# Stage to sonatype (unless building a -nightly release): -# -# Stage this Scala build on sonatype -# Rebuild modules with this Scala build, and stage them on sonatype as well -# This script can be run in multiple modes. It is design to work without any input, -# so that it could be run in Travis CI. In that mode, it'll build a release when -# the current HEAD of the checkout in $WORKSPACE is tagged, and stage to sonatype. Otherwise, -# it'll build a nightly. + +# Script Overview +# - determine scala version +# - determine module versions +# - build minimal core (aka locker) of Scala, use the determined version number, publish to private-repo +# - build those modules where a binary compatible version doesn't exist, publish to private-repo +# - build Scala using the previously built core and bootstrap modules, publish to private-repo (overwrites the minimal core version on private-repo) +# - for releases (not nightlies) +# - stage Scala on sonatype +# - rebuild modules that needed a rebuild with this Scala build, and stage them on sonatype +# - for nightlies +# - force rebuild all modules and publish them locally (for testing purposes) +# - the Scala version is serialized to jenkins.properties, which is passed downstream to scala-release jobs +# - this removes the need to tag scala/scala-dist (it's still encouraged for releases, but not a hard requirement) + + +# Specifying the Scala version: +# - To build a release (this enables publishing to sonatype): +# - Either specify SCALA_VER_BASE. You may also specify SCALA_VER_SUFFIX, the Scala version is SCALA_VER=$SCALA_VER_BASE$SCALA_VER_SUFFIX. +# - Or have the current HEAD tagged as v$base$suffix +# - To prevent staging on sonatype (for testing), set publishToSonatype to anything but "yes" +# - Note: After building a release, the jenkins job provides an updated versions.properties file as artifact. +# Put this file in the Scala repo and create a pull request, and also update the file build.number. +# +# - Otherwise, a nightly release is built: +# - version number is read from the build.number file, extended with -$sha-nightly + + +# Specifying module versions: there are two modes +# - If moduleVersioning="versions.properties" (default): in this mode we use release versions for the modules. +# - Module versions are read from the versions.properties file. +# - Set <MODULE>_VER to override the default, e.g. XML_VER="1.0.4". +# - The git revision is set to <MODULE>_REF="v$<MODULE>_VER". Make sure the tag exists (you can't override <MODULE>_REF). # -# Since the nightlies are intended to be a drop in replacement, all modules are built with the -# full Scala version as their binary version, so that you can just set scalaVersion to the -# nightly's sha-derived version and be good to go. +# - Otherwise (moduleVersioning has some other value): in this mode we use nightly version nubmers for modules. +# - By default the script sets all <MODULE>_REF to "HEAD", override to build a specific revision. +# - The <MODULE>_VER is set to a nightly version, for example "1.0.3-7-g14888a2-nightly" (you can't override <MODULE>_VER) + + +# Modules are automatically built if necessary. +# - A module is built if it doesn't exist in the maven repository. Note that the lookup uses two versions: +# - The version of the module (see below how it's determined) +# - The binary version of of the SCALA_VER release that is being built +# - sbt computes the binary version when looking up / building modules (*). Examples: +# - 2.12.0-M1, 2.12.0-RC3: the full version is used +# - 2.12.0, 2.12.1-M1, 2.12.1-RC3, 2.12.1: the binary version 2.12 is used # -# The other way to trigger a release is by setting the SCALA_VER_BASE env var. +# - Example: assume that `scala-xml_2.11 % 1.0.3` and `scala-xml_2.12.0-M1 % 1.0.3` both exists +# - XML_VER=1.0.3 and SCALA_VER=2.11.7 => no rebuild (binary version remains 2.11) +# - XML_VER=1.0.3 and SCALA_VER=2.12.0-M2 => rebuild (new binary version 2.12.0-M2) +# - XML_VER=1.0.4 and SCALA_VER=2.11.7 => rebuild (new version for the module, not yet on maven) +# NOTE: this is not the recommended way of publishing a module. Instead, prefer to release `scala-xml_2.11 % 1.0.4` +# using the existing scala 2.11.6 compiler before releasing 2.11.7. Sometimes it's necessary though. One +# example was 2.11.1, which contained a fix in the backend (SerialVersionUID was ignored). All modules needed +# to be re-built using the 2.11.1 release, we could not use 2.11.0. We could also not release the modules +# after 2.11.1 was out, because that way the scala-library-all pom of 2.11.1 would depend on the old modules. # -# By default, we build the versions of the modules as specified by versions.properties -# (as specified in the HEAD commit). Set moduleVersioning to something random -# to trigger building HEAD of each module, generating a fresh -$(git describe)-nightly version for each. +# (*) https://github.com/sbt/sbt/blob/0.13.8/util/cross/src/main/input_sources/CrossVersionUtil.scala#L39 + + +# Binary incompatible changes in Modules: example with Scala 2.11 / 2.12 and scala-parser-combinators +# - The 1.0.x branch on scala-parser-combinators remains binary compatible with 1.0.0 +# - Scala 2.11 will always use 1.0.x releases: we ship scala-parser-combinators with the distribution, +# so we cannot introduce incompatible changes in a minor release. +# - The master branch of scala-parser-combinators contains binary incompatible changes, versioned 1.1.x +# - Scala 2.12 will use 1.1.x releases +# - No changes to the build script required: just put the 1.1.x version number into versions.properties # -# PS: set publishToSonatype to anything but "yes" to avoid publishing to sonatype -# (publishing only done when $WORKSPACE checkout's HEAD is tagged / SCALA_VER_BASE is set.) +# Note: It's still OK for a module to release a binary incompatible version to maven, for example +# scala-parser-combinators_2.11 % 1.1.0. Users can depend on this in their sbt build. But for the +# distribution (tar/zip archives, scala-library-all) we have to stay on the binary compatible version. + + +# Requirements +# - sbtCmd must point to sbt from sbt-extras +# - ~/.sonatype-curl, ~/.m2/settings.xml, ~/.credentials, ~/.credentials-sonatype, ~/.credentials-private-repo +# as defined by https://github.com/scala/scala-jenkins-infra/tree/master/templates/default +# - ~/.sbt/0.13/plugins/gpg.sbt with: +# addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1") + +# Note: private-repo used to be private-repo.typesafe.com. now we're running artifactory on scala-ci.typesafe.com/artifactory -# set to something besides the default to build nightly snapshots of the modules instead of some tagged version moduleVersioning=${moduleVersioning-"versions.properties"} publishPrivateTask=${publishPrivateTask-"publish"} @@ -78,22 +91,13 @@ publishLockerPrivateTask=${publishLockerPrivateTask-$publishPrivateTask} # set t sbtCmd=${sbtCmd-sbt} # TESTING (this is a marker for defaults to change when testing locally: should be sbtx on my mac) -# 0.13.5 does not respect "set every scalaVersion", see -# https://github.com/scala/scala-parser-combinators/pull/27 -sbtCmd="$sbtCmd -sbt-version 0.13.2" +sbtCmd="$sbtCmd -sbt-version 0.13.8" forceRebuild=${forceRebuild-no} -# publishToSonatype -# set to anything but "yes" to avoid publishing to sonatype -# overridden to "no" when no SCALA_VER_BASE is passed and HEAD is not tagged with a valid version tag -# - antBuildTask="${antBuildTask-nightly}" # TESTING leave empty to avoid the sanity check (don't set it to "init" because ant will croak) clean="clean" # TESTING leave empty to speed up testing - - baseDir=${WORKSPACE-`pwd`} scriptsDir="$baseDir/scripts" . $scriptsDir/common @@ -109,7 +113,7 @@ mkdir -p $baseDir/resolutionScratch_ # repo used to publish "locker" scala to (to start the bootstrap) releaseTempRepoCred="private-repo" -releaseTempRepoUrl=${releaseTempRepoUrl-"http://private-repo.typesafe.com/typesafe/scala-release-temp/"} +releaseTempRepoUrl=${releaseTempRepoUrl-"https://scala-ci.typesafe.com/artifactory/scala-release-temp/"} # Used below in sbtArgs since we use a dedicated repository to share artifcacts between jobs, # so we need to configure SBT to use these rather than its default, Maven Central. @@ -139,7 +143,7 @@ update() { cd $2 git fetch --tags "https://github.com/$1/$2.git" - (git fetch "https://github.com/$1/$2.git" $3 && git checkout -q FETCH_HEAD) #|| git checkout -q $3 # || fallback is for local testing on tag + (git fetch "https://github.com/$1/$2.git" $3 && git checkout -fq FETCH_HEAD) #|| git checkout -fq $3 # || fallback is for local testing on tag git reset --hard } @@ -182,7 +186,8 @@ sbtBuild() { sbtResolve() { cd $baseDir/resolutionScratch_ touch build.sbt - cross=${4-binary} # Disabled / binary / full + # Can be set to `full` if a module requires cross-versioning against the full Scala version, like the continuations plugin. + cross=${4-binary} echo "### sbtResolve: $sbtCmd $sbtArgs " "${scalaVersionTasks[@]}" "\"$1\" % \"$2\" % \"$3\" cross CrossVersion.$cross" $sbtCmd $sbtArgs "${scalaVersionTasks[@]}" \ "set libraryDependencies := Seq(\"$1\" % \"$2\" % \"$3\" cross CrossVersion.$cross)" \ @@ -288,18 +293,21 @@ buildActorsMigration(){ fi } +# should only be called with publishTasks publishing to private-repo buildScalacheck(){ if [ "$SCALACHECK_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scalacheck" "scalacheck" $SCALACHECK_VER ) then echo "Found scalacheck $SCALACHECK_VER; not building." else update rickynils scalacheck $SCALACHECK_REF && gfxd - sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean $publishPrivateTask # test times out NOTE: never published to sonatype + sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean publish # test times out NOTE: never published to sonatype SCALACHECK_BUILT="yes" fi } # build modules, using ${buildTasks[@]} (except for Scalacheck, which is hard-coded to publish to private-repo) buildModules() { + publishTasks=('set credentials += Credentials(Path.userHome / ".credentials-private-repo")' "set every publishTo := Some(\"private-repo\" at \"$releaseTempRepoUrl\")") + buildTasks=($publishPrivateTask) buildXML buildParsers buildContinuations @@ -310,19 +318,62 @@ buildModules() { # buildPartestIface } +buildPublishedModules() { + publishTasks=('set credentials += Credentials(Path.userHome / ".credentials-sonatype")' "set pgpPassphrase := Some(Array.empty)") + buildTasks=($publishSonatypeTaskModules) + buildXML + buildParsers + buildContinuations + buildSwing + buildActorsMigration + buildPartest + # buildPartestIface +} + ## BUILD STEPS: +scalaVerToBinary() { + # $1 = SCALA_VER + # $2 = SCALA_VER_BASE + # $3 = SCALA_VER_SUFFIX + + local RE='\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)' + local majMin="$(echo $2 | sed -e "s#$RE#\1.\2#")" + local patch="$(echo $2 | sed -e "s#$RE#\3#")" + + # The binary version is majMin (e.g. "2.12") if + # - there's no suffix : 2.12.0, 2.12.1 + # - the suffix starts with "-bin": 2.12.0-bin-M1 + # - the patch version is > 0 : 2.12.1-M1, 1.12.3-RC2, 2.12.1-sha-nightly, 2.12.2-SNAPSHOT + # + # Othwersise, the binary version is the full version: 2.12.0-M1, 2.12.0-RC2, 2.12.0-sha-nightly, 2.12.0-SNAPSHOT + # + # Adapted from sbt: https://github.com/sbt/sbt/blob/0.13.8/util/cross/src/main/input_sources/CrossVersionUtil.scala#L39 + # + # Note: during the pre-release cycle of a major release (e.g. before 2.12.0), the SCALA_BINARY_VER of nightly / SNAPSHOT + # versions is the full version, e.g. 2.12.0-sha-nightly, so modules are always re-built. This is in line with what sbt + # does: for example, with scalaVersion := "2.12.0-SNAPSHOT", sbt will resolve scala-xml as scala-xml_2.12.0-SNAPSHOT. + # Once the 2.12.0 release is out, the binary version is 2.12 for all versions (e.g. for 2.12.1-sha-nightly). + + if [[ "$3" == "" || "${3:0:4}" == "-bin" || "$patch" != "0" ]]; then + echo "$majMin" + else + echo "$1" + fi +} + determineScalaVersion() { cd $WORKSPACE parseScalaProperties "versions.properties" + echo "repo_ref=2.11.x" >> $baseDir/jenkins.properties # for the -dist downstream jobs that build the actual archives + + # each of the branches below defines the following vars: SCALA_VER_BASE, SCALA_VER_SUFFIX, SCALADOC_SOURCE_LINKS_VER, publishToSonatype if [ -z "$SCALA_VER_BASE" ]; then echo "No SCALA_VER_BASE specified." - scalaTag=$(git describe --exact-match ||:) - - SCALA_BINARY_VER=${SCALA_BINARY_VER-"$scala_binary_version"} + scalaTag=$(git describe --tag --exact-match ||:) if [ -z "$scalaTag" ] then @@ -332,9 +383,8 @@ determineScalaVersion() { SCALA_VER_SUFFIX="-$(git rev-parse --short HEAD)-nightly" SCALADOC_SOURCE_LINKS_VER=$(git rev-parse HEAD) - # TODO: publish nightly snapshot using this script + # TODO: publish nightly snapshot using this script - currently it's a separate jenkins job still running at EPFL. publishToSonatype="no" - echo "repo_ref=2.11.x" >> $baseDir/jenkins.properties # for the -dist downstream jobs that build the actual archives else echo "HEAD is tagged as $scalaTag." # borrowed from https://github.com/cloudflare/semver_bash/blob/master/semver.sh @@ -356,13 +406,11 @@ determineScalaVersion() { fi SCALA_VER="$SCALA_VER_BASE$SCALA_VER_SUFFIX" + SCALA_BINARY_VER=$(scalaVerToBinary $SCALA_VER $SCALA_VER_BASE $SCALA_VER_SUFFIX) + echo "version=$SCALA_VER" >> $baseDir/jenkins.properties echo "sbtDistVersionOverride=-Dproject.version=$SCALA_VER" >> $baseDir/jenkins.properties - # We don't override the scala binary version: when running in -nightly + versions.properties versioning mode, - # we intend to be a drop-in replacement -- all you need to do is change the Scala version - # In order to override this, add 'set every scalaBinaryVersion := "'$SCALA_BINARY_VER'"', - # which, when used with pre-release Scala version numbers, will require tweaking at the sbt usage site as well. scalaVersionTasks=('set every scalaVersion := "'$SCALA_VER'"') echo "Building Scala $SCALA_VER." @@ -370,19 +418,18 @@ determineScalaVersion() { deriveVersion() { update $1 $2 $3 &> /dev/null - echo "$(git describe --match=v* | cut -dv -f2)-nightly" + echo "$(git describe --tag --match=v* | cut -dv -f2)-nightly" } deriveVersionAnyTag() { update $1 $2 $3 &> /dev/null - echo "$(git describe | cut -dv -f2)-nightly" + echo "$(git describe --tag | cut -dv -f2)-nightly" } # determineScalaVersion must have been called deriveModuleVersions() { - if [ "$moduleVersioning" == "versions.properties" ] - then - # use versions.properties as defaults when no version specified on command line + if [ "$moduleVersioning" == "versions.properties" ]; then + # use versions.properties as defaults when no version specified on the command line XML_VER=${XML_VER-$scala_xml_version_number} PARSERS_VER=${PARSERS_VER-$scala_parser_combinators_version_number} CONTINUATIONS_VER=${CONTINUATIONS_VER-$scala_continuations_plugin_version_number} @@ -391,32 +438,32 @@ deriveModuleVersions() { PARTEST_VER=${PARTEST_VER-$partest_version_number} SCALACHECK_VER=${SCALACHECK_VER-$scalacheck_version_number} - # If a _VER was not specified, the corresponding _REF will be non-empty by now (as specified, or HEAD) - XML_REF=${XML_REF-"v$XML_VER"} - PARSERS_REF=${PARSERS_REF-"v$PARSERS_VER"} - CONTINUATIONS_REF=${CONTINUATIONS_REF-"v$CONTINUATIONS_VER"} - SWING_REF=${SWING_REF-"v$SWING_VER"} - ACTORS_MIGRATION_REF=${ACTORS_MIGRATION_REF-"v$ACTORS_MIGRATION_VER"} - PARTEST_REF=${PARTEST_REF-"v$PARTEST_VER"} - # PARTEST_IFACE_REF=${PARTEST_IFACE_REF-"v$PARTEST_IFACE_VER"} - SCALACHECK_REF=${SCALACHECK_REF-"$SCALACHECK_VER"} + XML_REF="v$XML_VER" + PARSERS_REF="v$PARSERS_VER" + CONTINUATIONS_REF="v$CONTINUATIONS_VER" + SWING_REF="v$SWING_VER" + ACTORS_MIGRATION_REF="v$ACTORS_MIGRATION_VER" + PARTEST_REF="v$PARTEST_VER" + # PARTEST_IFACE_REF="v$PARTEST_IFACE_VER" + SCALACHECK_REF="$SCALACHECK_VER" # no `v` in their tags else - XML_VER=${XML_VER-$(deriveVersion scala scala-xml "$XML_REF")} - PARSERS_VER=${PARSERS_VER-$(deriveVersion scala scala-parser-combinators "$PARSERS_REF")} - CONTINUATIONS_VER=${CONTINUATIONS_VER-$(deriveVersion scala scala-continuations "$CONTINUATIONS_REF")} - SWING_VER=${SWING_VER-$(deriveVersion scala scala-swing "$SWING_REF")} - ACTORS_MIGRATION_VER=${ACTORS_MIGRATION_VER-$(deriveVersion scala actors-migration "$ACTORS_MIGRATION_REF")} - PARTEST_VER=${PARTEST_VER-$(deriveVersion scala scala-partest "$PARTEST_REF")} - SCALACHECK_VER=${SCALACHECK_VER-$(deriveVersionAnyTag rickynils scalacheck "$SCALACHECK_REF")} - + # use HEAD as default when no revision is specified on the command line XML_REF=${XML_REF-"HEAD"} PARSERS_REF=${PARSERS_REF-"HEAD"} CONTINUATIONS_REF=${CONTINUATIONS_REF-"HEAD"} SWING_REF=${SWING_REF-"HEAD"} ACTORS_MIGRATION_REF=${ACTORS_MIGRATION_REF-"HEAD"} PARTEST_REF=${PARTEST_REF-"HEAD"} - # PARTEST_IFACE_REF=${PARTEST_IFACE_REF-"HEAD"} + # PARTEST_IFACE_REF=${PARTEST_IFACE_REF-"HEAD"} SCALACHECK_REF=${SCALACHECK_REF-"HEAD"} + + XML_VER=$(deriveVersion scala scala-xml "$XML_REF") + PARSERS_VER=$(deriveVersion scala scala-parser-combinators "$PARSERS_REF") + CONTINUATIONS_VER=$(deriveVersion scala scala-continuations "$CONTINUATIONS_REF") + SWING_VER=$(deriveVersion scala scala-swing "$SWING_REF") + ACTORS_MIGRATION_VER=$(deriveVersion scala actors-migration "$ACTORS_MIGRATION_REF") + PARTEST_VER=$(deriveVersion scala scala-partest "$PARTEST_REF") + SCALACHECK_VER=$(deriveVersionAnyTag rickynils scalacheck "$SCALACHECK_REF") fi echo "Module versions (versioning strategy: $moduleVersioning):" @@ -431,6 +478,29 @@ deriveModuleVersions() { # PARTEST_IFACE_VER=${PARTEST_IFACE_VER-$(deriveVersion scala scala-partest-interface "$PARTEST_IFACE_REF")} } +createNetrcFile() { + local netrcFile=$HOME/`basename $1`-netrc + grep 'host=' $1 | sed 's/host=\(.*\)/machine \1/' > $netrcFile + grep 'user=' $1 | sed 's/user=\(.*\)/login \1/' >> $netrcFile + grep 'password=' $1 | sed 's/password=\(.*\)/password \1/' >> $netrcFile +} + +removeExistingBuilds() { + createNetrcFile "$HOME/.credentials-private-repo" + local netrcFile="$HOME/.credentials-private-repo-netrc" + + local storageApiUrl=`echo $releaseTempRepoUrl | sed 's/\(scala-release-temp\)/api\/storage\/\1/'` + local scalaLangModules=`curl -s $storageApiUrl/org/scala-lang | jq -r '.children | .[] | "org/scala-lang" + .uri'` + + for module in "org/scalacheck" $scalaLangModules; do + local artifacts=`curl -s $storageApiUrl/$module | jq -r ".children | .[] | select(.uri | contains(\"$SCALA_VER\")) | .uri"` + for artifact in $artifacts; do + echo "Deleting $releaseTempRepoUrl$module$artifact" + curl -s --netrc-file $netrcFile -X DELETE $releaseTempRepoUrl$module$artifact + done + done +} + constructUpdatedModuleVersions() { updatedModuleVersions=() @@ -485,8 +555,6 @@ bootstrap() { # publish to our internal repo (so we can resolve the modules in the scala build below) # we only need to build the modules necessary to build Scala itself # since the version of locker and quick are the same - publishTasks=('set credentials += Credentials(Path.userHome / ".credentials-private-repo")' "set every publishTo := Some(\"private-repo\" at \"$releaseTempRepoUrl\")") - buildTasks=($publishPrivateTask) buildModules constructUpdatedModuleVersions @@ -543,9 +611,7 @@ publishSonatype() { # (was hoping we could make everything go to the same staging repo, but it's not timing that causes two staging repos to be opened) # NOTE: only publish those for which versions are set # test and publish to sonatype, assuming you have ~/.sbt/0.13/sonatype.sbt and ~/.sbt/0.13/plugin/gpg.sbt - publishTasks=('set credentials += Credentials(Path.userHome / ".credentials-sonatype")' "set pgpPassphrase := Some(Array.empty)") - buildTasks=($publishSonatypeTaskModules) - buildModules + buildPublishedModules open=$(st_stagingReposOpen) allOpenUrls=$(echo $open | jq '.repositoryURI' | tr -d \") @@ -565,15 +631,10 @@ determineScalaVersion deriveModuleVersions +removeExistingBuilds + bootstrap if [ "$publishToSonatype" == "yes" ] then publishSonatype - else # build modules one more time, just to mimic the regular build as much when running as nightly - echo "### Rebuilding modules with quick, publishing to $baseDir/ivy/local" - buildTasks=(publish-local) - # buildScalacheck always uses publishPrivateTask (not buildTasks). we override it to avoid publishing to private-repo. - publishPrivateTask="publish-local" - forceRebuild="yes" - buildModules fi diff --git a/scripts/jobs/validate/test b/scripts/jobs/validate/test index c1c02c80cb..bedef2e458 100755 --- a/scripts/jobs/validate/test +++ b/scripts/jobs/validate/test @@ -11,7 +11,7 @@ case $prDryRun in # (in that sense it's locker, since it was built with starr by that upstream job) ant -Dstarr.version=$scalaVersion \ -Dscalac.args.optimise=-optimise \ - -Dlocker.skip=1 -Dstarr.use.released=1 -Dextra.repo.url=$prRepoUrl \ + -Dlocker.skip=1 -Dextra.repo.url=$prRepoUrl \ $testExtraArgs ${testTarget-test.core docs.done} ;; esac
\ No newline at end of file diff --git a/test/files/scalacheck/redblacktree.scala b/test/files/scalacheck/redblacktree.scala index 871444a4b8..4ded37b35a 100644 --- a/test/files/scalacheck/redblacktree.scala +++ b/test/files/scalacheck/redblacktree.scala @@ -33,7 +33,7 @@ package scala.collection.immutable.redblacktree { def mkTree(level: Int, parentIsBlack: Boolean = false, label: String = ""): Gen[Tree[String, Int]] = if (level == 0) { - value(null) + const(null) } else { for { oddOrEven <- choose(0, 2) diff --git a/tools/binary-repo-lib.sh b/tools/binary-repo-lib.sh index 84245ca54e..14c2c9464a 100755 --- a/tools/binary-repo-lib.sh +++ b/tools/binary-repo-lib.sh @@ -3,7 +3,7 @@ # Library to push and pull binary artifacts from a remote repository using CURL. remote_urlget="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap" -remote_urlpush="http://private-repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap" +remote_urlpush="http://dl.bintray.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap" libraryJar="$(pwd)/lib/scala-library.jar" desired_ext=".desired.sha1" push_jar="$(pwd)/tools/push.jar" diff --git a/versions.properties b/versions.properties index 2ecfd23800..9ebe8871be 100644 --- a/versions.properties +++ b/versions.properties @@ -3,32 +3,40 @@ # via scala-dist-pom.xml and scala-library-all-pom.xml # when adding new properties that influence a release, # also add them to the update.versions mechanism in build.xml, -# which is used by scala-release-2.11.x in scala/jenkins-scripts +# which is used by the release script scripts/jobs/integrate/bootstrap + +# The scala version used for boostrapping. This has no impact on the final classfiles: +# there are two stages (locker and quick), so compiler and library are always built +# with themselves. Stability is ensured by building a third stage (strap). starr.version=2.11.6 -starr.use.released=1 # These are the versions of the modules that go with this release. # These properties are used during PR validation and in dbuild builds. -# e.g. 2.11.0-RC1, 2.11 +# The scala.binary.version determines how modules are resolved. For example, it +# determines which partest artifact is being used for running the tests. +# It has to be set in the following way: +# - After 2.x.0 is released, the binary version is 2.x. +# - During milestones and RCs, modules are cross-built against the full version. +# So the value is the full version (e.g. 2.12.0-M1). scala.binary.version=2.11 # e.g. 2.11.0-RC1, 2.11.0, 2.11.1-RC1, 2.11.1 # this defines the dependency on scala-continuations-plugin in scala-dist's pom scala.full.version=2.11.6 # external modules shipped with distribution, as specified by scala-library-all's pom -scala-xml.version.number=1.0.3 -scala-parser-combinators.version.number=1.0.3 +scala-xml.version.number=1.0.4 +scala-parser-combinators.version.number=1.0.4 scala-continuations-plugin.version.number=1.0.2 scala-continuations-library.version.number=1.0.2 -scala-swing.version.number=1.0.1 -akka-actor.version.number=2.3.4 +scala-swing.version.number=1.0.2 +akka-actor.version.number=2.3.10 actors-migration.version.number=1.1.0 jline.version=2.12.1 # external modules, used internally (not shipped) -partest.version.number=1.0.6 -scalacheck.version.number=1.11.4 +partest.version.number=1.0.7 +scalacheck.version.number=1.11.6 # TODO: modularize the compiler #scala-compiler-doc.version.number=1.0.0-RC1 |