From a0cfdbabd713bd1362059a6dea92b1cc970cf95f Mon Sep 17 00:00:00 2001 From: dominv Date: Tue, 9 May 2017 16:33:47 +0200 Subject: [PATCH 1/5] Renaming async directory to freestyle-async --- .../async/shared/src/main/scala/async.scala | 0 .../async/shared/src/test/scala/AsyncTests.scala | 0 .../fs2/shared/src/main/scala/asyncFs2/async.scala | 0 .../fs2/shared/src/test/scala/asyncFs2/AsyncFsTests.scala | 0 .../monix/shared/src/main/scala/asyncMonix/async.scala | 0 .../monix/shared/src/test/scala/asyncMonix/AsyncMonixTests.scala | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {async => freestyle-async}/async/shared/src/main/scala/async.scala (100%) rename {async => freestyle-async}/async/shared/src/test/scala/AsyncTests.scala (100%) rename {async => freestyle-async}/fs2/shared/src/main/scala/asyncFs2/async.scala (100%) rename {async => freestyle-async}/fs2/shared/src/test/scala/asyncFs2/AsyncFsTests.scala (100%) rename {async => freestyle-async}/monix/shared/src/main/scala/asyncMonix/async.scala (100%) rename {async => freestyle-async}/monix/shared/src/test/scala/asyncMonix/AsyncMonixTests.scala (100%) diff --git a/async/async/shared/src/main/scala/async.scala b/freestyle-async/async/shared/src/main/scala/async.scala similarity index 100% rename from async/async/shared/src/main/scala/async.scala rename to freestyle-async/async/shared/src/main/scala/async.scala diff --git a/async/async/shared/src/test/scala/AsyncTests.scala b/freestyle-async/async/shared/src/test/scala/AsyncTests.scala similarity index 100% rename from async/async/shared/src/test/scala/AsyncTests.scala rename to freestyle-async/async/shared/src/test/scala/AsyncTests.scala diff --git a/async/fs2/shared/src/main/scala/asyncFs2/async.scala b/freestyle-async/fs2/shared/src/main/scala/asyncFs2/async.scala similarity index 100% rename from async/fs2/shared/src/main/scala/asyncFs2/async.scala rename to freestyle-async/fs2/shared/src/main/scala/asyncFs2/async.scala diff --git a/async/fs2/shared/src/test/scala/asyncFs2/AsyncFsTests.scala b/freestyle-async/fs2/shared/src/test/scala/asyncFs2/AsyncFsTests.scala similarity index 100% rename from async/fs2/shared/src/test/scala/asyncFs2/AsyncFsTests.scala rename to freestyle-async/fs2/shared/src/test/scala/asyncFs2/AsyncFsTests.scala diff --git a/async/monix/shared/src/main/scala/asyncMonix/async.scala b/freestyle-async/monix/shared/src/main/scala/asyncMonix/async.scala similarity index 100% rename from async/monix/shared/src/main/scala/asyncMonix/async.scala rename to freestyle-async/monix/shared/src/main/scala/asyncMonix/async.scala diff --git a/async/monix/shared/src/test/scala/asyncMonix/AsyncMonixTests.scala b/freestyle-async/monix/shared/src/test/scala/asyncMonix/AsyncMonixTests.scala similarity index 100% rename from async/monix/shared/src/test/scala/asyncMonix/AsyncMonixTests.scala rename to freestyle-async/monix/shared/src/test/scala/asyncMonix/AsyncMonixTests.scala From 43d6aa0b805c6cb539b806be5f2242d3657f0163 Mon Sep 17 00:00:00 2001 From: dominv Date: Tue, 9 May 2017 23:47:08 +0200 Subject: [PATCH 2/5] Fixing build.sbt --- build.sbt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 6fc41990..d3efe1df 100644 --- a/build.sbt +++ b/build.sbt @@ -95,7 +95,7 @@ lazy val effects = (crossProject in file("freestyle-effects")) lazy val effectsJVM = effects.jvm lazy val effectsJS = effects.js -lazy val async = (crossProject in file("async/async")) +lazy val async = (crossProject in file("freestyle-async/async")) .dependsOn(freestyle) .settings(name := "freestyle-async") .jsSettings(sharedJsSettings: _*) @@ -104,7 +104,7 @@ lazy val async = (crossProject in file("async/async")) lazy val asyncJVM = async.jvm lazy val asyncJS = async.js -lazy val asyncMonix = (crossProject in file("async/monix")) +lazy val asyncMonix = (crossProject in file("freestyle-async/monix")) .dependsOn(freestyle, async) .settings(name := "freestyle-async-monix") .crossDepSettings( @@ -117,7 +117,7 @@ lazy val asyncMonix = (crossProject in file("async/monix")) lazy val asyncMonixJVM = asyncMonix.jvm lazy val asyncMonixJS = asyncMonix.js -lazy val asyncFs = (crossProject in file("async/fs2")) +lazy val asyncFs = (crossProject in file("freestyle-async/fs2")) .dependsOn(freestyle, async) .settings(name := "freestyle-async-fs2") .jsSettings(sharedJsSettings: _*) From e9c360d8da9aa747abc131028d263505adffdd24 Mon Sep 17 00:00:00 2001 From: dominv Date: Wed, 10 May 2017 11:11:21 +0200 Subject: [PATCH 3/5] Moving to freestyle-async --- build.sbt | 2 +- .../{async => }/shared/src/main/scala/async.scala | 0 .../shared/src/test/scala/AsyncTests.scala | 11 +++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) rename freestyle-async/{async => }/shared/src/main/scala/async.scala (100%) rename freestyle-async/{async => }/shared/src/test/scala/AsyncTests.scala (85%) diff --git a/build.sbt b/build.sbt index d3efe1df..8ed84e82 100644 --- a/build.sbt +++ b/build.sbt @@ -95,7 +95,7 @@ lazy val effects = (crossProject in file("freestyle-effects")) lazy val effectsJVM = effects.jvm lazy val effectsJS = effects.js -lazy val async = (crossProject in file("freestyle-async/async")) +lazy val async = (crossProject in file("freestyle-async")) .dependsOn(freestyle) .settings(name := "freestyle-async") .jsSettings(sharedJsSettings: _*) diff --git a/freestyle-async/async/shared/src/main/scala/async.scala b/freestyle-async/shared/src/main/scala/async.scala similarity index 100% rename from freestyle-async/async/shared/src/main/scala/async.scala rename to freestyle-async/shared/src/main/scala/async.scala diff --git a/freestyle-async/async/shared/src/test/scala/AsyncTests.scala b/freestyle-async/shared/src/test/scala/AsyncTests.scala similarity index 85% rename from freestyle-async/async/shared/src/test/scala/AsyncTests.scala rename to freestyle-async/shared/src/test/scala/AsyncTests.scala index d4de0994..2f1a6142 100644 --- a/freestyle-async/async/shared/src/test/scala/AsyncTests.scala +++ b/freestyle-async/shared/src/test/scala/AsyncTests.scala @@ -66,5 +66,16 @@ class AsyncTests extends AsyncWordSpec with Matchers { program[AsyncM.Op].interpret[Future] recover { case OhNoException() => 42 } map { _ shouldBe 42 } } + + "allow Async errors to short-circuit a program" in { + def program[F[_]: AsyncM] = + for { + a <- FreeS.pure(1) + b <- AsyncM[F].async[Int](cb => cb(Left(OhNoException()))) + c <- FreeS.pure(3) + } yield a + b + c + + program[AsyncM.Op].interpret[Future] recover { case OhNoException() => 42 } map { _ shouldBe 42 } + } } } From fca5c60ecb7f696da37358e2a9206003f79b2d1c Mon Sep 17 00:00:00 2001 From: dominv Date: Wed, 10 May 2017 11:21:39 +0200 Subject: [PATCH 4/5] Fixing AsyncTests --- freestyle-async/shared/src/test/scala/AsyncTests.scala | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/freestyle-async/shared/src/test/scala/AsyncTests.scala b/freestyle-async/shared/src/test/scala/AsyncTests.scala index 2f1a6142..469754db 100644 --- a/freestyle-async/shared/src/test/scala/AsyncTests.scala +++ b/freestyle-async/shared/src/test/scala/AsyncTests.scala @@ -67,15 +67,5 @@ class AsyncTests extends AsyncWordSpec with Matchers { program[AsyncM.Op].interpret[Future] recover { case OhNoException() => 42 } map { _ shouldBe 42 } } - "allow Async errors to short-circuit a program" in { - def program[F[_]: AsyncM] = - for { - a <- FreeS.pure(1) - b <- AsyncM[F].async[Int](cb => cb(Left(OhNoException()))) - c <- FreeS.pure(3) - } yield a + b + c - - program[AsyncM.Op].interpret[Future] recover { case OhNoException() => 42 } map { _ shouldBe 42 } - } } } From cfc5c2b88063d28450b837ddd4ae7e21c57ce54c Mon Sep 17 00:00:00 2001 From: dominv Date: Mon, 15 May 2017 15:46:56 +0200 Subject: [PATCH 5/5] Fixing freestyle-async --- build.sbt | 2 +- freestyle-async/{ => async}/shared/src/main/scala/async.scala | 0 .../{ => async}/shared/src/test/scala/AsyncTests.scala | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename freestyle-async/{ => async}/shared/src/main/scala/async.scala (100%) rename freestyle-async/{ => async}/shared/src/test/scala/AsyncTests.scala (100%) diff --git a/build.sbt b/build.sbt index 8ed84e82..d3efe1df 100644 --- a/build.sbt +++ b/build.sbt @@ -95,7 +95,7 @@ lazy val effects = (crossProject in file("freestyle-effects")) lazy val effectsJVM = effects.jvm lazy val effectsJS = effects.js -lazy val async = (crossProject in file("freestyle-async")) +lazy val async = (crossProject in file("freestyle-async/async")) .dependsOn(freestyle) .settings(name := "freestyle-async") .jsSettings(sharedJsSettings: _*) diff --git a/freestyle-async/shared/src/main/scala/async.scala b/freestyle-async/async/shared/src/main/scala/async.scala similarity index 100% rename from freestyle-async/shared/src/main/scala/async.scala rename to freestyle-async/async/shared/src/main/scala/async.scala diff --git a/freestyle-async/shared/src/test/scala/AsyncTests.scala b/freestyle-async/async/shared/src/test/scala/AsyncTests.scala similarity index 100% rename from freestyle-async/shared/src/test/scala/AsyncTests.scala rename to freestyle-async/async/shared/src/test/scala/AsyncTests.scala