Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build for scala 2.12 #41

Merged
merged 1 commit into from May 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.sbt
Expand Up @@ -6,7 +6,7 @@ val commonSettings = Seq(
organization := "com.eed3si9n",
version := "0.4.2-SNAPSHOT",
scalaVersion := "2.11.4",
crossScalaVersions := Seq("2.11.6", "2.10.5"),
crossScalaVersions := Seq("2.12.2", "2.11.6", "2.10.5"),
homepage := Some(url("http://eed3si9n.com/treehugger")),
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/mit-license.php")),
description := "a library to code Scala programmatically.",
Expand All @@ -23,7 +23,7 @@ val library = project.in(file("library")).
settings(
name := "treehugger",
libraryDependencies ++= libDeps(scalaVersion.value)
,sourceDirectory in (Pamflet, pf) := (baseDirectory in ThisBuild).value / "docs"
//,sourceDirectory in (Pamflet, pf) := (baseDirectory in ThisBuild).value / "docs"
)

val bridge = project.in(file("bridge")).
Expand All @@ -42,6 +42,6 @@ lazy val root = project.in(file(".")).
publishArtifact := false,
publish := (),
publishLocal := ()
,pf := (pf in library).value
//,pf := (pf in library).value
).
aggregate(library, bridge)
4 changes: 2 additions & 2 deletions library/src/main/scala/treehugger/Symbols.scala
Expand Up @@ -162,7 +162,7 @@ trait Symbols extends api.Symbols { self: Forest =>
* Not applicable for term symbols.
*/
def typeConstructor: Type =
error("typeConstructor inapplicable for " + this)
sys.error("typeConstructor inapplicable for " + this)

final def toType: Type = typeConstructor

Expand Down Expand Up @@ -380,7 +380,7 @@ trait Symbols extends api.Symbols { self: Forest =>
case PRIVATE => notPRIVATE
case PROTECTED => notPROTECTED
case OVERRIDE => notOVERRIDE
case _ => error("setNotFlag on invalid flag: " + flag)
case _ => sys.error("setNotFlag on invalid flag: " + flag)
})

/** The class or term up to which this symbol is accessible,
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/scala/treehugger/TreeGen.scala
Expand Up @@ -96,7 +96,7 @@ trait TreeGen { self: Forest =>
// mkAttributedQualifier(firstStable.get)

case _ =>
error("bad qualifier received: " + failMessage)
sys.error("bad qualifier received: " + failMessage)
}
}
/** If this is a reference to a method with an empty
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/scala/treehugger/Types.scala
Expand Up @@ -719,7 +719,7 @@ trait Types extends api.Types { self: Forest =>
case AnnotatedType(annots, underlying, self) => AnnotatedType(annots, appliedType(underlying, args), self)
case ErrorType => tycon
case WildcardType => tycon // needed for neg/t0226
case _ => error(tycon.toString)
case _ => sys.error(tycon.toString)
}

// Helper Classes ---------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions library/src/main/scala/treehugger/treehuggerdsls.scala
Expand Up @@ -408,7 +408,7 @@ trait TreehuggerDSLs { self: Forest =>
}
class NoBlockDefSymStart(sym: Symbol) extends DefSymStart(sym) {
@deprecated("0.4.0", "DEF(x) := BLOCK() is no longer supported. Use PROC(x) or DEFINFER(x).")
def :=(rhs: Block): DefDef = error("DEF(x) := BLOCK() is no longer supported. Use PROC(x) or DEFINFER(x).")
def :=(rhs: Block): DefDef = sys.error("DEF(x) := BLOCK() is no longer supported. Use PROC(x) or DEFINFER(x).")
override def :=(rhs: Tree): DefDef = mkTree(rhs)
}

Expand Down Expand Up @@ -436,7 +436,7 @@ trait TreehuggerDSLs { self: Forest =>

class NoBlockDefTreeStart(name: Name) extends DefTreeStart(name) {
@deprecated("0.4.0", "DEF(x) := BLOCK() is no longer supported. Use PROC(x) or DEFINFER(x).")
def :=(rhs: Block): DefDef = error("DEF(x) := BLOCK() is no longer supported. Use PROC(x) or DEFINFER(x).")
def :=(rhs: Block): DefDef = sys.error("DEF(x) := BLOCK() is no longer supported. Use PROC(x) or DEFINFER(x).")
override def :=(rhs: Tree): DefDef = mkTree(rhs)
}

Expand Down Expand Up @@ -914,7 +914,7 @@ trait TreehuggerDSLs { self: Forest =>
def TYPE_FUNCTION(typs: Type*): Type = TYPE_FUNCTION(typs.toList)
def TYPE_FUNCTION(typs: Iterable[Type]): Type =
typs.toList match {
case Nil => error("TYPE_FUNCTION must take at least one Type.")
case Nil => sys.error("TYPE_FUNCTION must take at least one Type.")
case x => functionType(x.init, x.last)
}
def TYPE_SINGLETON(tree: Tree) = singleType(TYPE_REF(tree), NoSymbol)
Expand Down
1 change: 1 addition & 0 deletions project/dependencies.scala
Expand Up @@ -3,6 +3,7 @@ import Keys._

object Dependencies {
def specs2(sv: String) = sv match {
case x if x startsWith "2.12." => "org.specs2" %% "specs2-core" % "3.8.9"
case x if x startsWith "2.11." => "org.specs2" %% "specs2" % "2.3.12"
case x if x startsWith "2.10." => "org.specs2" %% "specs2" % "2.1.1"
case x if x startsWith "2.9." => "org.specs2" %% "specs2" % "1.12.3"
Expand Down
2 changes: 1 addition & 1 deletion project/pf.sbt
@@ -1 +1 @@
addSbtPlugin("com.eed3si9n" % "sbt-pamflet" % "0.1.0-SNAPSHOT")
//addSbtPlugin("com.eed3si9n" % "sbt-pamflet" % "0.1.0-SNAPSHOT")