From e3388ca79d153e796a13a4639219a29e339c6714 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 16 May 2017 13:42:31 +0200 Subject: [PATCH 1/3] Re-enable singleton type assertion in erasure --- compiler/src/dotty/tools/dotc/transform/Erasure.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala index 9bb783ddc776..e3e1fd9f8da2 100644 --- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala +++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala @@ -234,9 +234,7 @@ object Erasure extends TypeTestsCasts{ * in ExtensionMethods#transform. */ def cast(tree: Tree, pt: Type)(implicit ctx: Context): Tree = { - // TODO: The commented out assertion fails for tailcall/t6574.scala - // Fix the problem and enable the assertion. - // assert(!pt.isInstanceOf[SingletonType], pt) + assert(!pt.isInstanceOf[SingletonType], pt) if (pt isRef defn.UnitClass) unbox(tree, pt) else (tree.tpe, pt) match { case (JavaArrayType(treeElem), JavaArrayType(ptElem)) From b7d1034ebad1bba2069b6ba672ab1070cb206276 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 16 May 2017 16:37:09 +0200 Subject: [PATCH 2/3] Move linking to sbt script --- .drone.yml | 1 - project/scripts/sbt | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1f0d07204ca8..96bbc3c3e2ba 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,6 @@ pipeline: image: lampepfl/dotty:24-04-2017 pull: true commands: - - ln -s /var/cache/drone/ivy2 "$HOME/.ivy2" - ./project/scripts/sbt "${CI_TEST}" when: branch: diff --git a/project/scripts/sbt b/project/scripts/sbt index 5773b444a118..d9c12d004f87 100755 --- a/project/scripts/sbt +++ b/project/scripts/sbt @@ -13,6 +13,10 @@ else fi if [ $SHOULD_RUN = true ]; then + # get the ivy2 cache: + ln -s /var/cache/drone/ivy2 "$HOME/.ivy2" || true + + # run sbt with the supplied arg: sbt -J-Xmx4096m \ -J-XX:ReservedCodeCacheSize=512m \ -J-XX:MaxMetaspaceSize=1024m \ From 6d9ea4a762f1a0f5c715114bc6ca471b3a25fbb4 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 17 May 2017 09:33:32 +0200 Subject: [PATCH 3/3] Remove aliases and add NIGHTLYBUILD=yes to publish script --- project/scripts/sbtPublish | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/project/scripts/sbtPublish b/project/scripts/sbtPublish index 29f946e09ac6..2224d998036f 100755 --- a/project/scripts/sbtPublish +++ b/project/scripts/sbtPublish @@ -14,21 +14,20 @@ if [ $SHOULD_RUN = false ]; then exit 0 fi -if [ -z "$SONATYPE_USER" -o -z "$SONATYPE_PW" -o -z "$PGP_PW" ]; then +if [ -z "$2" -o -z "$3" -o -z "$4" ]; then echo "invalid args: this script takes 4 args, usage:" echo "" echo " ./project/scripts/sbt SHOULD_RUN SONATYPE_USER SONATYPE_PW PGP_PW" exit 1 fi -CMD=' ;set credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", "'"$SONATYPE_USER"'", "'"$SONATYPE_PW"'")' -CMD="$CMD ;set pgpPassphrase := Some(\"\"\"$PGP_PW\"\"\".toCharArray)" +CMD=' ;set credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", "'"$2"'", "'"$3"'")' +CMD="$CMD ;set pgpPassphrase := Some(\"\"\"$4\"\"\".toCharArray)" CMD="$CMD ;set pgpSecretRing := file(\"/keys/secring.asc\")" CMD="$CMD ;set pgpPublicRing := file(\"/keys/pubring.asc\")" CMD="$CMD ;dotty-bootstrapped/publishSigned ;sonatypeRelease" -echo "Will run sbt with command: \"$CMD\"" - +export NIGHTLYBUILD="yes" sbt -J-Xmx4096m \ -J-XX:ReservedCodeCacheSize=512m \ -J-XX:MaxMetaspaceSize=1024m \