diff --git a/.travis.yml b/.travis.yml index ddc5cb6948..1d6651c164 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ matrix: jdk: oraclejdk8 script: - - curl -L -o ~/bin/mill https://github.com/lihaoyi/mill/releases/download/0.2.6/0.2.6-19-807e47 && chmod +x ~/bin/mill + - curl -L -o ~/bin/mill https://github.com/lihaoyi/mill/releases/download/0.4.1/0.4.1-4-158d11 && chmod +x ~/bin/mill - export PATH=~/bin/mill:$PATH - "$CI_SCRIPT" diff --git a/build.sc b/build.sc index 99e12618b0..b7f3ed1183 100644 --- a/build.sc +++ b/build.sc @@ -17,21 +17,21 @@ import $file.example.scalatags.build import $file.example.staticFiles.build import $file.example.todo.build import $file.example.todoApi.build -import $file.example.todoDb.build +//import $file.example.todoDb.build import $file.example.twirl.build import $file.example.variableRoutes.build import $file.example.websockets.build object cask extends ScalaModule with PublishModule { - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"org.scala-lang:scala-reflect:${scalaVersion()}", ivy"io.undertow:undertow-core:2.0.13.Final", - ivy"com.lihaoyi::upickle:0.7.1", + ivy"com.lihaoyi::upickle:0.7.5", ) - def compileIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.1.7") + def compileIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.2.0") def scalacOptions = Seq("-P:acyclic:force") - def scalacPluginIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.1.7") + def scalacPluginIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.2.0") def publishVersion = build.publishVersion()._2 @@ -50,10 +50,10 @@ object cask extends ScalaModule with PublishModule { def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.6", - ivy"com.lihaoyi::requests::0.1.5", - ivy"org.xerial:sqlite-jdbc:3.18.0", - ivy"io.getquill::quill-jdbc:2.6.0" + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", +// ivy"org.xerial:sqlite-jdbc:3.18.0", +// ivy"io.getquill::quill-jdbc:2.6.0" ) } } @@ -78,9 +78,9 @@ object example extends Module{ object redirectAbort extends $file.example.redirectAbort.build.AppModule with LocalModule object scalatags extends $file.example.scalatags.build.AppModule with LocalModule object staticFiles extends $file.example.staticFiles.build.AppModule with LocalModule - object todo extends $file.example.todo.build.AppModule with LocalModule +// object todo extends $file.example.todo.build.AppModule with LocalModule object todoApi extends $file.example.todoApi.build.AppModule with LocalModule - object todoDb extends $file.example.todoDb.build.AppModule with LocalModule +// object todoDb extends $file.example.todoDb.build.AppModule with LocalModule object twirl extends $file.example.twirl.build.AppModule with LocalModule object variableRoutes extends $file.example.variableRoutes.build.AppModule with LocalModule object websockets extends $file.example.websockets.build.AppModule with LocalModule @@ -93,17 +93,16 @@ def uploadToGithub(authKey: String) = T.command{ val (releaseTag, label) = publishVersion() if (releaseTag == label){ - scalaj.http.Http("https://api.github.com/repos/lihaoyi/cask/releases") - .postData( - ujson.write( - Js.Obj( - "tag_name" -> releaseTag, - "name" -> releaseTag - ) + requests.post( + "https://api.github.com/repos/lihaoyi/cask/releases", + data = ujson.write( + Js.Obj( + "tag_name" -> releaseTag, + "name" -> releaseTag ) - ) - .header("Authorization", "token " + authKey) - .asString + ), + headers = Seq("Authorization" -> s"token $authKey") + ) } val examples = Seq( @@ -121,9 +120,9 @@ def uploadToGithub(authKey: String) = T.command{ $file.example.redirectAbort.build.millSourcePath, $file.example.scalatags.build.millSourcePath, $file.example.staticFiles.build.millSourcePath, - $file.example.todo.build.millSourcePath, +// $file.example.todo.build.millSourcePath, $file.example.todoApi.build.millSourcePath, - $file.example.todoDb.build.millSourcePath, +// $file.example.todoDb.build.millSourcePath, $file.example.twirl.build.millSourcePath, $file.example.variableRoutes.build.millSourcePath, $file.example.websockets.build.millSourcePath, @@ -139,7 +138,7 @@ def uploadToGithub(authKey: String) = T.command{ |if [ ! -f out/mill-cask ]; then | echo "Initializing Cask/Mill build tool for the first time" | mkdir -p out && - | (echo "#!/usr/bin/env sh" && curl -L https://github.com/lihaoyi/mill/releases/download/0.2.6/0.2.6-27-613878) > out/mill-cask + | (echo "#!/usr/bin/env sh" && curl -L https://github.com/lihaoyi/mill/releases/download/0.4.1/0.4.1-4-158d11) > out/mill-cask |fi | |chmod +x out/mill-cask diff --git a/cask/src/cask/internal/DispatchTrie.scala b/cask/src/cask/internal/DispatchTrie.scala index 952c39bdfe..9f1a9c3394 100644 --- a/cask/src/cask/internal/DispatchTrie.scala +++ b/cask/src/cask/internal/DispatchTrie.scala @@ -2,10 +2,10 @@ package cask.internal import collection.mutable object DispatchTrie{ def construct[T](index: Int, - inputs: Seq[(IndexedSeq[String], T, Boolean)]): DispatchTrie[T] = { - val continuations = mutable.Map.empty[String, mutable.Buffer[(IndexedSeq[String], T, Boolean)]] + inputs: collection.Seq[(collection.IndexedSeq[String], T, Boolean)]): DispatchTrie[T] = { + val continuations = mutable.Map.empty[String, mutable.Buffer[(collection.IndexedSeq[String], T, Boolean)]] - val terminals = mutable.Buffer.empty[(IndexedSeq[String], T, Boolean)] + val terminals = mutable.Buffer.empty[(collection.IndexedSeq[String], T, Boolean)] for((path, endPoint, allowSubpath) <- inputs) { if (path.length < index) () // do nothing diff --git a/cask/src/cask/internal/Router.scala b/cask/src/cask/internal/Router.scala index 64af4cda78..4b1181112d 100644 --- a/cask/src/cask/internal/Router.scala +++ b/cask/src/cask/internal/Router.scala @@ -65,7 +65,7 @@ object Router{ } } - if (missing.nonEmpty || unknown.nonEmpty) Result.Error.MismatchedArguments(missing, unknown.toSeq) + if (missing.nonEmpty || unknown.nonEmpty) Result.Error.MismatchedArguments(missing.toSeq, unknown.toSeq) else { try invoke0( target, diff --git a/cask/src/cask/internal/Util.scala b/cask/src/cask/internal/Util.scala index 431944a2f4..3f7ab61c4a 100644 --- a/cask/src/cask/internal/Util.scala +++ b/cask/src/cask/internal/Util.scala @@ -61,7 +61,7 @@ object Util { * * Written imperatively for performance since it's used all over the place. */ - def splitPath(p: String): IndexedSeq[String] = { + def splitPath(p: String): collection.IndexedSeq[String] = { val pLength = p.length var i = 0 while(i < pLength && p(i) == '/') i += 1 @@ -92,7 +92,7 @@ object Util { trace.toString } def softWrap(s: String, leftOffset: Int, maxWidth: Int) = { - val oneLine = s.lines.mkString(" ").split(' ') + val oneLine = s.linesIterator.mkString(" ").split(' ') lazy val indent = " " * leftOffset diff --git a/cask/src/cask/main/ErrorMsgs.scala b/cask/src/cask/main/ErrorMsgs.scala index 0d6f8c66a9..254f4e0ef0 100644 --- a/cask/src/cask/main/ErrorMsgs.scala +++ b/cask/src/cask/main/ErrorMsgs.scala @@ -44,7 +44,7 @@ object ErrorMsgs { for((lhs, rhs) <- args) yield { val lhsPadded = lhs.padTo(leftColWidth, ' ') - val rhsPadded = rhs.lines.mkString("\n") + val rhsPadded = rhs.linesIterator.mkString("\n") s"$leftIndentStr $lhsPadded $rhsPadded" } val mainDocSuffix = main.doc match{ diff --git a/cask/src/cask/main/Main.scala b/cask/src/cask/main/Main.scala index e12683fbce..88d7a61932 100644 --- a/cask/src/cask/main/Main.scala +++ b/cask/src/cask/main/Main.scala @@ -44,7 +44,7 @@ abstract class BaseMain{ .map { method => method -> DispatchTrie.construct[(Routes, Routes.EndpointMetadata[_])](0, for ((route, metadata) <- routeList if metadata.endpoint.methods.contains(method)) - yield (Util.splitPath(metadata.endpoint.path): IndexedSeq[String], (route, metadata), metadata.endpoint.subpath) + yield (Util.splitPath(metadata.endpoint.path): collection.IndexedSeq[String], (route, metadata), metadata.endpoint.subpath) ) }.toMap diff --git a/cask/src/cask/main/Routes.scala b/cask/src/cask/main/Routes.scala index 1a74b87df1..a4660a9935 100644 --- a/cask/src/cask/main/Routes.scala +++ b/cask/src/cask/main/Routes.scala @@ -12,7 +12,7 @@ object Routes{ entryPoint: EntryPoint[T, _]) case class RoutesEndpointsMetadata[T](value: EndpointMetadata[T]*) object RoutesEndpointsMetadata{ - implicit def initialize[T] = macro initializeImpl[T] + implicit def initialize[T]: RoutesEndpointsMetadata[T] = macro initializeImpl[T] implicit def initializeImpl[T: c.WeakTypeTag](c: Context): c.Expr[RoutesEndpointsMetadata[T]] = { import c.universe._ val router = new cask.internal.Router[c.type](c) diff --git a/cask/src/cask/model/Params.scala b/cask/src/cask/model/Params.scala index 270c190352..cb0730bc4e 100644 --- a/cask/src/cask/model/Params.scala +++ b/cask/src/cask/model/Params.scala @@ -17,10 +17,10 @@ case class Request(exchange: HttpServerExchange, remainingPathSegments: Seq[Stri Util.transferTo(data, baos) baos.toByteArray } - lazy val queryParams: Map[String, Seq[String]] = { + lazy val queryParams: Map[String, collection.Seq[String]] = { exchange.getQueryParameters.asScala.mapValues(_.asScala.toArray.toSeq).toMap } - lazy val headers: Map[String, Seq[String]] = { + lazy val headers: Map[String, collection.Seq[String]] = { exchange.getRequestHeaders.asScala .map{ header => header.getHeaderName.toString.toLowerCase -> header.asScala } .toMap diff --git a/ci/upload.sc b/ci/upload.sc index 6c47295f95..783f76802c 100644 --- a/ci/upload.sc +++ b/ci/upload.sc @@ -1,15 +1,14 @@ #!/usr/bin/env amm import ammonite.ops._ -import scalaj.http._ @main def shorten(longUrl: String) = { println("shorten longUrl " + longUrl) - val shortUrl = Http("https://git.io") - .postForm(Seq("url" -> longUrl)) - .asString - .headers("Location") - .head + val shortUrl = requests.post( + "https://git.io", + data = Seq("url" -> longUrl), + ).headers("location").head + println("shorten shortUrl " + shortUrl) shortUrl } @@ -18,9 +17,10 @@ def apply(uploadedFile: Path, tagName: String, uploadName: String, authKey: String): String = { - val body = Http("https://api.github.com/repos/lihaoyi/cask/releases/tags/" + tagName) - .header("Authorization", "token " + authKey) - .asString.body + val body = requests.get( + s"https://api.github.com/repos/lihaoyi/cask/releases/tags/$tagName", + headers = Seq("Authorization" -> s"token $authKey") + ).text val parsed = ujson.read(body) @@ -33,15 +33,19 @@ def apply(uploadedFile: Path, s"https://uploads.github.com/repos/lihaoyi/cask/releases/" + s"$snapshotReleaseId/assets?name=$uploadName" - val res = Http(uploadUrl) - .header("Content-Type", "application/octet-stream") - .header("Authorization", "token " + authKey) - .timeout(connTimeoutMs = 5000, readTimeoutMs = 60000) - .postData(read.bytes! uploadedFile) - .asString + val res = requests.post( + uploadUrl, + data = read.bytes! uploadedFile, + headers = Seq( + "Content-Type" -> "application/octet-stream", + "Authorization" -> s"token $authKey" + ), + connectTimeout = 5000, readTimeout = 60000 + ) + - println(res.body) - val longUrl = ujson.read(res.body)("browser_download_url").str.toString + println(res.text) + val longUrl = ujson.read(res.text)("browser_download_url").str.toString println("Long Url " + longUrl) diff --git a/docs/pages/1 - Cask: a Scala HTTP micro-framework.md b/docs/pages/1 - Cask: a Scala HTTP micro-framework.md index 4b261a3333..e7e72b5cf1 100644 --- a/docs/pages/1 - Cask: a Scala HTTP micro-framework.md +++ b/docs/pages/1 - Cask: a Scala HTTP micro-framework.md @@ -162,7 +162,7 @@ what to do in each case. You can use the `@cask.route` annotation to do so $$$formJsonPost If you need to handle a JSON-encoded POST request, you can use the -`@cast.postJson` decorator. This assumes the posted request body is a JSON dict, +`@cask.postJson` decorator. This assumes the posted request body is a JSON dict, and uses its keys to populate the endpoint's parameters, either as raw `ujson.Js.Value`s or deserialized into `Seq[Int]`s or other things. Deserialization is handled using the @@ -217,7 +217,7 @@ the relevant headers or status code for you. Cask doesn't come bundled with HTML templating functionality, but it makes it really easy to use community-standard libraries like [Scalatags](https://github.com/lihaoyi/scalatags) to render your HTML. Simply -adding the relevant `ivy"com.lihaoyi::scalatags:0.6.7"` dependency to your +adding the relevant `ivy"com.lihaoyi::scalatags:0.7.0"` dependency to your `build.sc` file is enough to render Scalatags templates: $$$scalatags @@ -347,7 +347,7 @@ $$$compress3 $$$websockets Cask's Websocket endpoints are very similar to Cask's HTTP endpoints. Annotated -with `@cask.websocket` instead of `@cask.get` or `@cast.post`, the primary +with `@cask.websocket` instead of `@cask.get` or `@cask.post`, the primary difference is that instead of only returning a `cask.Response`, you now have an option of returning a `io.undertow.websockets.WebSocketConnectionCallback`. @@ -382,41 +382,61 @@ etc.. Those can be managed via the normal mechanism for [Serving Static Files](#serving-static-files). -## TodoMVC Database Integration - -$$$todoDb - -This example demonstrates how to use Cask to write a TodoMVC API server that -persists it's state in a database rather than in memory. We use the -[Quill](http://getquill.io/) database access library to write a `@transactional` -decorator that automatically opens one transaction per call to an endpoint, -ensuring that database queries are properly committed on success or rolled-back -on error. Note that because the default database connector propagates its -transaction context in a thread-local, `@transactional` does not need to pass -the `ctx` object into each endpoint as an additional parameter list, and so we -simply leave it out. - -While this example is specific to Quill, you can easily modify the -`@transactional` decorator to make it work with whatever database access library -you happen to be using. For libraries which need an implicit transaction, it can -be passed into each endpoint function as an additional parameter list as -described in -[Extending Endpoints with Decorators](#extending-endpoints-with-decorators). - -## TodoMVC Full Stack Web - - -The following code snippet is the complete code for a full-stack TodoMVC -implementation: including HTML generation for the web UI via -[Scalatags](https://github.com/lihaoyi/scalatags), Javascript for the -interactivity, static file serving, and database integration via -[Quill](https://github.com/getquill/quill). While slightly long, this example -should give you a tour of all the things you need to know to use Cask. - -Note that this is a "boring" server-side-rendered webapp with Ajax interactions, -without any complex front-end frameworks or libraries: it's purpose is to -demonstrate a simple working web application of using Cask end-to-end, which you -can build upon to create your own Cask web application architected however you -would like. - -$$$todo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/compress/build.sc b/example/compress/build.sc index 2816643a4a..699b94f947 100644 --- a/example/compress/build.sc +++ b/example/compress/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/compress2/build.sc b/example/compress2/build.sc index 2816643a4a..699b94f947 100644 --- a/example/compress2/build.sc +++ b/example/compress2/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/compress3/build.sc b/example/compress3/build.sc index 2816643a4a..699b94f947 100644 --- a/example/compress3/build.sc +++ b/example/compress3/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/cookies/build.sc b/example/cookies/build.sc index 2816643a4a..699b94f947 100644 --- a/example/cookies/build.sc +++ b/example/cookies/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/decorated/build.sc b/example/decorated/build.sc index 2816643a4a..699b94f947 100644 --- a/example/decorated/build.sc +++ b/example/decorated/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/decorated2/build.sc b/example/decorated2/build.sc index 2816643a4a..699b94f947 100644 --- a/example/decorated2/build.sc +++ b/example/decorated2/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/endpoints/build.sc b/example/endpoints/build.sc index 2816643a4a..699b94f947 100644 --- a/example/endpoints/build.sc +++ b/example/endpoints/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/formJsonPost/app/test/src/ExampleTests.scala b/example/formJsonPost/app/test/src/ExampleTests.scala index 137a9780ee..148ebfdd1e 100644 --- a/example/formJsonPost/app/test/src/ExampleTests.scala +++ b/example/formJsonPost/app/test/src/ExampleTests.scala @@ -19,7 +19,7 @@ object ExampleTests extends TestSuite{ val tests = Tests{ 'FormJsonPost - test(FormJsonPost){ host => requests.post(s"$host/json", data = """{"value1": true, "value2": [3]}""").text() ==> - "OK true Vector(3)" + "OK true List(3)" requests.post( s"$host/form", diff --git a/example/formJsonPost/build.sc b/example/formJsonPost/build.sc index 2816643a4a..699b94f947 100644 --- a/example/formJsonPost/build.sc +++ b/example/formJsonPost/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/httpMethods/build.sc b/example/httpMethods/build.sc index 2816643a4a..699b94f947 100644 --- a/example/httpMethods/build.sc +++ b/example/httpMethods/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/minimalApplication/build.sc b/example/minimalApplication/build.sc index 2816643a4a..699b94f947 100644 --- a/example/minimalApplication/build.sc +++ b/example/minimalApplication/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/minimalApplication2/build.sc b/example/minimalApplication2/build.sc index 2816643a4a..699b94f947 100644 --- a/example/minimalApplication2/build.sc +++ b/example/minimalApplication2/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/redirectAbort/build.sc b/example/redirectAbort/build.sc index 2816643a4a..699b94f947 100644 --- a/example/redirectAbort/build.sc +++ b/example/redirectAbort/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/scalatags/build.sc b/example/scalatags/build.sc index 3303601b5a..c89d9cc743 100644 --- a/example/scalatags/build.sc +++ b/example/scalatags/build.sc @@ -2,18 +2,18 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", - ivy"com.lihaoyi::scalatags:0.6.7", + ivy"com.lihaoyi::scalatags:0.7.0", ) object test extends Tests{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/staticFiles/build.sc b/example/staticFiles/build.sc index c83a0df174..911f9894ff 100644 --- a/example/staticFiles/build.sc +++ b/example/staticFiles/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -13,8 +13,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) def forkWorkingDir = build.millSourcePath diff --git a/example/todo/build.sc b/example/todo/build.sc index 093fb3f2b5..782aaef5fe 100644 --- a/example/todo/build.sc +++ b/example/todo/build.sc @@ -2,20 +2,20 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ivy"org.xerial:sqlite-jdbc:3.18.0", ivy"io.getquill::quill-jdbc:2.5.4", - ivy"com.lihaoyi::scalatags:0.6.7", + ivy"com.lihaoyi::scalatags:0.7.0", ) object test extends Tests{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/todoApi/build.sc b/example/todoApi/build.sc index 2816643a4a..699b94f947 100644 --- a/example/todoApi/build.sc +++ b/example/todoApi/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/todoDb/build.sc b/example/todoDb/build.sc index c6f8514166..ab1181eeae 100644 --- a/example/todoDb/build.sc +++ b/example/todoDb/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ivy"org.xerial:sqlite-jdbc:3.18.0", @@ -13,8 +13,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/twirl/build.sc b/example/twirl/build.sc index 362713333b..b8e174654d 100644 --- a/example/twirl/build.sc +++ b/example/twirl/build.sc @@ -1,14 +1,14 @@ import mill._, scalalib._ -import $ivy.`com.lihaoyi::mill-contrib-twirllib:0.2.6-27-613878` +import $ivy.`com.lihaoyi::mill-contrib-twirllib:0.4.1-4-158d11` trait AppModule extends ScalaModule with mill.twirllib.TwirlModule{ - def scalaVersion = "2.12.6" - def twirlVersion = "1.3.15" + def scalaVersion = "2.13.0" + def twirlVersion = "1.5.0-M1" def generatedSources = T{ Seq(compileTwirl().classes) } def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", - ivy"com.lihaoyi::scalatags:0.6.7", + ivy"com.lihaoyi::scalatags:0.7.0", ivy"com.typesafe.play::twirl-api:${twirlVersion()}", ) @@ -16,8 +16,8 @@ trait AppModule extends ScalaModule with mill.twirllib.TwirlModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/variableRoutes/app/test/src/ExampleTests.scala b/example/variableRoutes/app/test/src/ExampleTests.scala index 49c960bd11..48455fa7e3 100644 --- a/example/variableRoutes/app/test/src/ExampleTests.scala +++ b/example/variableRoutes/app/test/src/ExampleTests.scala @@ -27,7 +27,7 @@ object ExampleTests extends TestSuite{ requests.get(s"$host/post/123?param=xyz¶m=abc").text() ==> - "Post 123 ArrayBuffer(xyz, abc)" + "Post 123 ArraySeq(xyz, abc)" requests.get(s"$host/post/123").text() ==> """Missing argument: (param: Seq[String]) diff --git a/example/variableRoutes/build.sc b/example/variableRoutes/build.sc index 2816643a4a..699b94f947 100644 --- a/example/variableRoutes/build.sc +++ b/example/variableRoutes/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ) } } \ No newline at end of file diff --git a/example/websockets/build.sc b/example/websockets/build.sc index 3661ee36b1..31f75f5d7a 100644 --- a/example/websockets/build.sc +++ b/example/websockets/build.sc @@ -2,7 +2,7 @@ import mill._, scalalib._ trait AppModule extends ScalaModule{ - def scalaVersion = "2.12.6" + def scalaVersion = "2.13.0" def ivyDeps = Agg( ivy"com.lihaoyi::cask:0.1.9", ) @@ -11,8 +11,8 @@ trait AppModule extends ScalaModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.3", - ivy"com.lihaoyi::requests::0.1.5", + ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::requests::0.2.0", ivy"org.asynchttpclient:async-http-client:2.5.2" ) }