@@ -3,7 +3,7 @@ import scalalib._
33import scalajslib ._
44import publish ._
55
6- val crossVersions = Seq (" 2.11.12" , " 2.12.7" , " 2.13.0-M5 " )
6+ val crossVersions = Seq (" 2.11.12" , " 2.12.7" , " 2.13.0-RC1 " )
77object fastparse extends Module {
88 object jvm extends Cross [fastparseJvmModule](crossVersions:_* )
99 class fastparseJvmModule (val crossScalaVersion : String ) extends FastparseModule {
@@ -27,15 +27,15 @@ object fastparse extends Module{
2727 object js extends Cross [fastparseJsModule](crossVersions:_* )
2828 class fastparseJsModule (val crossScalaVersion : String ) extends FastparseModule with ScalaJSModule {
2929 def platformSegment = " js"
30- def scalaJSVersion = " 0.6.25 "
30+ def scalaJSVersion = " 0.6.27 "
3131 object test extends Tests with CommonTestModule {
3232 def platformSegment = " js"
3333 }
3434 }
3535}
3636trait FastparseModule extends CommonCrossModule {
3737 def ivyDeps = Agg (
38- ivy " com.lihaoyi::sourcecode::0.1.5 " ,
38+ ivy " com.lihaoyi::sourcecode::0.1.6 " ,
3939 )
4040 def compileIvyDeps = Agg (
4141 ivy " org.scala-lang:scala-reflect: ${scalaVersion()}"
@@ -69,6 +69,7 @@ trait FastparseModule extends CommonCrossModule{
6969 implicit def Sequencer1[T1, T2]: Sequencer[T1, T2, (T1, T2)] = Sequencer0{case (t1, t2) => (t1, t2)}
7070 }
7171 """ .stripMargin
72+ file.toIO.getParentFile.mkdirs()
7273 ammonite.ops.write(file, output)
7374 Seq (PathRef (file))
7475 }
@@ -100,7 +101,7 @@ object pythonparse extends Module{
100101
101102trait ExampleParseJsModule extends CommonCrossModule with ScalaJSModule {
102103 def moduleDeps = Seq (fastparse.js())
103- def scalaJSVersion = " 0.6.25 "
104+ def scalaJSVersion = " 0.6.27 "
104105 def platformSegment = " js"
105106 object test extends Tests with CommonTestModule {
106107 def platformSegment = " js"
@@ -120,7 +121,35 @@ trait ExampleParseJvmModule extends CommonCrossModule{
120121 }
121122}
122123
124+
125+ // Remove once mill has proper support for 2.13.0-RC1
126+ object CustomZincWorker extends mill.scalalib.ZincWorkerModule {
127+ def scalaCompilerBridgeSourceJar (scalaVersion : String , scalaOrganization : String ) = {
128+ val (scalaVersion0, scalaBinaryVersion0, bridgeVersion) = scalaVersion match {
129+ case s if s.startsWith(" 2.13." ) => (" 2.13.0-M2" , " 2.13.0-M2" , " 1.2.5" )
130+ case _ => (scalaVersion, mill.scalalib.api.Util .scalaBinaryVersion(scalaVersion), Versions .zinc)
131+ }
132+
133+ val (bridgeDep, bridgeName) = {
134+ val org = " org.scala-sbt"
135+ val name = " compiler-bridge"
136+ (ivy " $org:: $name: $bridgeVersion" , s " ${name}_ $scalaBinaryVersion0" )
137+ }
138+
139+ mill.scalalib.Lib .resolveDependencies(
140+ repositories,
141+ Lib .depToDependency(_, scalaVersion0, " " ),
142+ Seq (bridgeDep),
143+ sources = true
144+ ).map(deps =>
145+ mill.scalalib.api.Util .grepJar(deps.map(_.path), bridgeName, bridgeVersion, sources = true )
146+ )
147+ }
148+ }
149+
123150trait CommonCrossModule extends CrossScalaModule with PublishModule {
151+ def zincWorker : ZincWorkerModule =
152+ CustomZincWorker
124153
125154 def publishVersion = " 2.1.0"
126155 def artifactName = millModuleSegments.parts.dropRight(2 ).mkString(" -" )
@@ -151,9 +180,12 @@ trait CommonCrossModule extends CrossScalaModule with PublishModule{
151180
152181}
153182trait CommonTestModule extends ScalaModule with TestModule {
183+ def zincWorker : ZincWorkerModule =
184+ CustomZincWorker
185+
154186 def platformSegment : String
155187 def ivyDeps = Agg (
156- ivy " com.lihaoyi::utest::0.6.6 " ,
188+ ivy " com.lihaoyi::utest::0.6.7 " ,
157189 )
158190
159191// def scalacOptions = T{ if (scalaVersion() == "2.12.7") Seq("-opt:l:method") else Nil }
@@ -214,14 +246,14 @@ object perftests extends Module{
214246 }
215247 def testFrameworks = Seq (" utest.runner.Framework" )
216248 def ivyDeps = Agg (
217- ivy " com.lihaoyi::utest::0.6.6 " ,
249+ ivy " com.lihaoyi::utest::0.6.7 " ,
218250 ivy " org.scala-lang:scala-compiler: ${scalaVersion()}"
219251 )
220252 }
221253}
222254
223255object demo extends ScalaJSModule {
224- def scalaJSVersion = " 0.6.25 "
256+ def scalaJSVersion = " 0.6.27 "
225257 def scalaVersion = " 2.12.7"
226258 def moduleDeps = Seq (
227259 scalaparse.js(" 2.12.7" ),
0 commit comments