From ba11bea8fd8247348dc8a5fffc29272998aaaf1a Mon Sep 17 00:00:00 2001 From: Antoine Gourlay Date: Wed, 31 Jan 2018 14:43:31 +0100 Subject: [PATCH] Revert "Merge pull request #118 from alonsodomin/native" This reverts commit fd760fc2e8ef8bd69610ef8587300b8580084387, reversing changes made to 615b70f266a7772f101f5bc1372375ed3bef1346. Conflicts: build.sbt project/plugins.sbt --- .travis.yml | 5 ----- admin/setup_travis.sh | 22 ------------------- build.sbt | 22 ++++--------------- .../util/parsing/input/PositionCache.scala | 14 ------------ project/plugins.sbt | 3 --- 5 files changed, 4 insertions(+), 62 deletions(-) delete mode 100755 admin/setup_travis.sh delete mode 100644 native/src/main/scala/scala/util/parsing/input/PositionCache.scala diff --git a/.travis.yml b/.travis.yml index 544f7534..a5996721 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,5 @@ language: scala -dist: trusty - -sudo: required - addons: apt: packages: @@ -15,7 +11,6 @@ before_install: - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts > /tmp/hosts - sudo mv /tmp/hosts /etc/hosts - cat /etc/hosts # optionally check the content *after* - - admin/setup_travis.sh env: global: diff --git a/admin/setup_travis.sh b/admin/setup_travis.sh deleted file mode 100755 index 294ee6a2..00000000 --- a/admin/setup_travis.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e - -sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test -sudo apt-get -qq update -sudo apt-get install -y -qq \ - clang++-3.8 \ - libgc-dev \ - libunwind8-dev - -# Install re2 -# Starting from Ubuntu 16.04 LTS, it'll be available as http://packages.ubuntu.com/xenial/libre2-dev -sudo apt-get install -y make -export CXX=clang++-3.8 -git clone https://code.googlesource.com/re2 -pushd re2 -git checkout 2017-03-01 -make -j4 test -sudo make install prefix=/usr -make testinstall prefix=/usr -popd diff --git a/build.sbt b/build.sbt index 09dce913..07ac4eed 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,4 @@ import ScalaModulePlugin._ -import sbtcrossproject.{crossProject, CrossType} scalaVersionsByJvm in ThisBuild := { val v211 = "2.11.11" @@ -15,11 +14,12 @@ scalaVersionsByJvm in ThisBuild := { } lazy val root = project.in(file(".")) - .aggregate(`scala-parser-combinatorsJS`, `scala-parser-combinatorsJVM`, `scala-parser-combinatorsNative`) + .aggregate(`scala-parser-combinatorsJS`, `scala-parser-combinatorsJVM`) .settings(disablePublishing) -lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(file(".")). +lazy val `scala-parser-combinators` = crossProject.in(file(".")). settings(scalaModuleSettings: _*). + jvmSettings(scalaModuleSettingsJVM). settings( name := "scala-parser-combinators", version := "1.0.7-SNAPSHOT", @@ -40,10 +40,7 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati version.value ) ). - jvmSettings(scalaModuleSettingsJVM). jvmSettings( - // Mima uses the name of the jvm project in the artifactId - // when resolving previous versions (so no "-jvm" project) OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}"), libraryDependencies += "junit" % "junit" % "4.12" % "test", libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test" @@ -52,18 +49,7 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati // Scala.js cannot run forked tests fork in Test := false ). - jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)). - nativeSettings( - scalaVersion := "2.11.11", - skip in compile := System.getProperty("java.version").startsWith("1.6"), - test := {}, - libraryDependencies := { - if (!scalaVersion.value.startsWith("2.11")) - libraryDependencies.value.filterNot(_.organization == "org.scala-native") - else libraryDependencies.value - } - ) + jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)) lazy val `scala-parser-combinatorsJVM` = `scala-parser-combinators`.jvm lazy val `scala-parser-combinatorsJS` = `scala-parser-combinators`.js -lazy val `scala-parser-combinatorsNative` = `scala-parser-combinators`.native diff --git a/native/src/main/scala/scala/util/parsing/input/PositionCache.scala b/native/src/main/scala/scala/util/parsing/input/PositionCache.scala deleted file mode 100644 index ff9f144f..00000000 --- a/native/src/main/scala/scala/util/parsing/input/PositionCache.scala +++ /dev/null @@ -1,14 +0,0 @@ -package scala.util.parsing.input - -import java.lang.CharSequence -import java.util.{AbstractMap, Collections} - -private[input] trait PositionCache { - private[input] lazy val indexCache: java.util.Map[CharSequence,Array[Int]] = new AbstractMap[CharSequence, Array[Int]] { - - override def entrySet() = Collections.emptySet() - - // the /dev/null of Maps - override def put(ch: CharSequence, a: Array[Int]) = null - } -} diff --git a/project/plugins.sbt b/project/plugins.sbt index 5b32d634..1ea1fbfe 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,3 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.12") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.21") -addSbtPlugin("org.scala-native" % "sbt-crossproject" % "0.2.2") -addSbtPlugin("org.scala-native" % "sbt-scalajs-crossproject" % "0.2.2") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.3")