summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-10-29 21:22:03 -0700
committerLi Haoyi <haoyi.sg@gmail.com>2017-10-29 21:22:03 -0700
commit405fa45fb0f2fe2a5d7d8f0f7ebd8f112fc7cd70 (patch)
tree2ff021ac69d86c7819378ba2510ab7ed2b9b063a /build.sbt
parentf32fca9c5858c487a83bf461d5b2ecc772025a4a (diff)
downloadmill-405fa45fb0f2fe2a5d7d8f0f7ebd8f112fc7cd70.tar.gz
mill-405fa45fb0f2fe2a5d7d8f0f7ebd8f112fc7cd70.tar.bz2
mill-405fa45fb0f2fe2a5d7d8f0f7ebd8f112fc7cd70.zip
Got Zinc working on the test bench, compiling forge's own project
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt33
1 files changed, 2 insertions, 31 deletions
diff --git a/build.sbt b/build.sbt
index 469308c7..93175419 100644
--- a/build.sbt
+++ b/build.sbt
@@ -16,39 +16,10 @@ libraryDependencies ++= Seq(
"com.lihaoyi" %% "sourcecode" % "0.1.4",
"com.lihaoyi" %% "pprint" % "0.5.3",
"com.lihaoyi" % "ammonite" % "1.0.3" cross CrossVersion.full,
- "com.typesafe.play" %% "play-json" % "2.6.6"
+ "com.typesafe.play" %% "play-json" % "2.6.6",
+ "org.scala-sbt" %% "zinc" % "1.0.3"
)
-sourceGenerators in Compile += Def.task {
- val dir = (sourceManaged in Compile).value
- val file = dir/"fasterparser"/"SequencerGen.scala"
- // Only go up to 21, because adding the last element makes it 22
- val tuples = (2 to 21).map{ i =>
- val ts = (1 to i) map ("T" + _)
- val chunks = (1 to i) map { n =>
- s"t._$n"
- }
- val tsD = (ts :+ "D").mkString(",")
- s"""
- implicit def Sequencer$i[$tsD]: Sequencer[(${ts.mkString(", ")}), D, ($tsD)] =
- Sequencer0((t, d) => (${chunks.mkString(", ")}, d))
- """
- }
- val output = s"""
- package forge
- trait SequencerGen[Sequencer[_, _, _]] extends LowestPriSequencer[Sequencer]{
- protected[this] def Sequencer0[A, B, C](f: (A, B) => C): Sequencer[A, B, C]
- ${tuples.mkString("\n")}
- }
- trait LowestPriSequencer[Sequencer[_, _, _]]{
- protected[this] def Sequencer0[A, B, C](f: (A, B) => C): Sequencer[A, B, C]
- implicit def Sequencer1[T1, T2]: Sequencer[T1, T2, (T1, T2)] = Sequencer0{case (t1, t2) => (t1, t2)}
- }
- """.stripMargin
- IO.write(file, output)
- Seq(file)
-}
-
test in assembly := {}
assemblyOption in assembly := (assemblyOption in assembly).value.copy(