Skip to content

Commit

Permalink
Merge pull request #1512 from xeno-by/topic/langmeta
Browse files Browse the repository at this point in the history
Merge langmeta back into scalameta
  • Loading branch information
xeno-by committed Apr 24, 2018
2 parents 6f6a81c + 3772736 commit 9fc1514
Show file tree
Hide file tree
Showing 84 changed files with 308 additions and 748 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ matrix:
- CI_TEST: ci-fast
- CI_SCALA_VERSION: 2.12.4
- CI_SCALA_JS: true
- env:
- CI_TEST: ci-fast
- CI_SCALA_VERSION: 2.10.6
- CI_PUBLISH: true
- env:
- CI_TEST: ci-metac
- CI_SCALA_VERSION: 2.12.4
Expand Down
4 changes: 2 additions & 2 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

"Public API" means all public definitions in the artifacts under the
`org.scalameta` Maven groupId whole fully-qualified name starts with
`scala.meta.` or `org.langmeta.`, but does not include `.internal.` and `.contrib.`,
e.g. `scala.meta.Tree` or `org.langmeta.Position`:
`scala.meta.`, but does not include `.internal.` and `.contrib.`,
e.g. `scala.meta.Tree` or `scala.meta.inputs.Position`:
* `{x+1}.0.0` is strongly encouraged to be backward compatible with `x.y.z`
modulo deprecation warnings:
* It is desirable for every Scala program compilable against `x.y.z`
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ environment:
build_script:
- sbt version # dummy step, a build_script step is required by appveyor.
test_script:
- sbt langmetaTestsJVM/test testsJVM/test # testsJS/test is disabled because of OOM errors
- sbt testsJVM/test # testsJS/test is disabled because of OOM errors
cache:
- C:\Users\appveyor\.m2
- C:\Users\appveyor\.ivy2
Expand Down
2 changes: 0 additions & 2 deletions bin/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ set -eux

version=$1

coursier fetch org.scalameta:langmeta_2.10:$version -r sonatype:releases

coursier fetch org.scalameta:contrib_2.12:$version -r sonatype:releases
coursier fetch org.scalameta:metacp_2.12:$version -r sonatype:releases
coursier fetch org.scalameta:metap_2.12:$version -r sonatype:releases
Expand Down
70 changes: 12 additions & 58 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,10 @@ addCommandAlias("benchQuick", benchQuick.command)
// ci-fast is not a CiCommand because `plz x.y.z test` is super slow,
// it runs `test` sequentially in every defined module.
commands += Command.command("ci-fast") { s =>
if (ciScalaVersion.startsWith("2.10")) {
s"wow $ciScalaVersion" ::
"langmetaTestsJVM/test" ::
s
} else {
val langmetaTests =
if (ciPlatform == "JVM") "langmetaTestsJVM/test"
else "version" // dummy task on JS
s"wow $ciScalaVersion" ::
langmetaTests ::
("tests" + ciPlatform + "/test") ::
ci("doc") :: // skips 2.10 projects
s
}
s"wow $ciScalaVersion" ::
("tests" + ciPlatform + "/test") ::
ci("doc") ::
s
}
commands += Command.command("ci-native") { s =>
"metapNative/nativeLink" :: s
Expand Down Expand Up @@ -115,7 +105,7 @@ lazy val semanticdb3 = crossProject(JSPlatform, JVMPlatform, NativePlatform)
)
.nativeSettings(nativeSettings)
.jvmSettings(
crossScalaVersions := List(LatestScala210, LatestScala211, LatestScala212)
crossScalaVersions := List(LatestScala211, LatestScala212)
)
.jsSettings(
crossScalaVersions := List(LatestScala211, LatestScala212)
Expand Down Expand Up @@ -189,7 +179,7 @@ lazy val metacp = project
.enablePlugins(BuildInfoPlugin)
// NOTE: workaround for https://github.com/sbt/sbt-core-next/issues/8
.disablePlugins(BackgroundRunPlugin)
.dependsOn(semanticdb3JVM, langmetaJVM)
.dependsOn(semanticdb3JVM, ioJVM)

lazy val metap = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Pure)
Expand All @@ -207,25 +197,6 @@ lazy val metapJVM = metap.jvm
lazy val metapJS = metap.js
lazy val metapNative = metap.native

/** ======================== LANGMETA ======================== **/
lazy val langmeta = crossProject(JSPlatform, JVMPlatform)
.in(file("langmeta/langmeta"))
.settings(
publishableSettings,
description := "Langmeta umbrella module that includes all public APIs",
scalacOptions -= "-Xfatal-warnings", // suppress deprecation warnings
libraryDependencies += "com.lihaoyi" %%% "pprint" % "0.5.3"
)
.jvmSettings(
crossScalaVersions := List(LatestScala210, LatestScala211, LatestScala212)
)
.jsSettings(
crossScalaVersions := List(LatestScala211, LatestScala212)
)
.dependsOn(semanticdb3)
lazy val langmetaJVM = langmeta.jvm
lazy val langmetaJS = langmeta.js

/** ======================== SCALAMETA ======================== **/
lazy val common = crossProject(JSPlatform, JVMPlatform)
.in(file("scalameta/common"))
Expand All @@ -235,6 +206,7 @@ lazy val common = crossProject(JSPlatform, JVMPlatform)
description := "Bag of private and public helpers used in scalameta APIs and implementations",
enableMacros
)
.dependsOn(semanticdb3)
lazy val commonJVM = common.jvm
lazy val commonJS = common.js

Expand All @@ -244,7 +216,7 @@ lazy val io = crossProject(JSPlatform, JVMPlatform)
publishableSettings,
description := "Scalameta APIs for input/output"
)
.dependsOn(langmeta, common)
.dependsOn(common)

lazy val ioJVM = io.jvm
lazy val ioJS = io.js
Expand All @@ -267,7 +239,7 @@ lazy val inputs = crossProject(JSPlatform, JVMPlatform)
description := "Scalameta APIs for source code",
enableMacros
)
.dependsOn(langmeta, common, io)
.dependsOn(common, io)
lazy val inputsJVM = inputs.jvm
lazy val inputsJS = inputs.js

Expand Down Expand Up @@ -357,7 +329,7 @@ lazy val semanticdb = crossProject(JSPlatform, JVMPlatform)
publishableSettings,
description := "Scalameta semantic database APIs"
)
.dependsOn(langmeta)
.dependsOn(common)
lazy val semanticdbJVM = semanticdb.jvm
lazy val semanticdbJS = semanticdb.js

Expand Down Expand Up @@ -456,6 +428,7 @@ lazy val tests = crossProject(JSPlatform, JVMPlatform)
"databaseClasspath" -> classDirectory.in(semanticdbIntegration, Compile).value.getAbsolutePath
),
buildInfoPackage := "scala.meta.tests",
libraryDependencies += "com.lihaoyi" %%% "fansi" % "0.2.5" % "test",
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.0.1" % "test"
)
.jvmSettings(
Expand All @@ -470,20 +443,6 @@ lazy val tests = crossProject(JSPlatform, JVMPlatform)
lazy val testsJVM = tests.jvm
lazy val testsJS = tests.js

// NOTE: Most of the tests that could be part of the project still live in testsJVM.
// At some point, we plan to explore splitting langmeta into a separate repo,
// and at this point we will deal with splitting the tests appropriately.
lazy val langmetaTestsJVM = project
.in(file("langmeta/tests"))
.settings(
sharedSettings,
nonPublishableSettings,
crossScalaVersions := List(LatestScala210, LatestScala211, LatestScala212),
description := "Tests for scalameta APIs that are published for Scala 2.10",
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.0.1" % "test"
)
.dependsOn(langmetaJVM)

/** ======================== BENCHES ======================== **/
lazy val bench = project
.in(file("bench/suite"))
Expand Down Expand Up @@ -824,12 +783,7 @@ def macroDependencies(hardcore: Boolean) = libraryDependencies ++= {
Seq("org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided")
else Nil
}
val backwardCompat210 = {
if (scalaVersion.value.startsWith("2.10"))
Seq("org.scalamacros" %% "quasiquotes" % "2.1.0")
else Seq()
}
scalaReflect ++ scalaCompiler ++ backwardCompat210
scalaReflect ++ scalaCompiler
}

lazy val isTagPush = sys.env.get("TRAVIS_TAG").exists(_.nonEmpty)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions langmeta/langmeta/shared/src/main/scala/org/langmeta/io/Api.scala

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 9fc1514

Please sign in to comment.