Skip to content

Commit

Permalink
Enable interop for scala.js (zio#28)
Browse files Browse the repository at this point in the history
* Enable interop for scala.js

  * Test more thoroughly
  * Delete `Alternative` instance (unlawful)
  * Simplify some method implementations

* Disable failing cats-effect laws for the time being

  * `bracketReleaseIsCalledOnCompletedOrError`
  * `runCancelableIsSynchronous`

* Add a test for summoning Monad[UIO]

* Define maximum memory limit in .jvmopts

* Increase no_output_timeout for scala.js on 2.13

* Override runCancelableIsSynchronous

* override bracketReleaseIsCalledOnCompletedOrError (replace F.pure(b) with fa.attempt.as(b))

* Silence errors from runCancelable/runAsync same as cats-IO impl does. (unsafeRunAsyncAndForget logs errors via EC)

* Further bump JVM limits in .jvmopts

* Further bump JVM limits

* Fix cause of flaky equality – zipPar is not deterministic; replace genParallel by ZManaged.fork-based version; split out shared test implicits; re-add repeat tests for ApplicativeLocal & ConcurrentEffect

* inherit AnyFunSuite directly in test base

* fix build

* remove test loops

* decrease heap to 4G

* duplicate .jvmopts in .sbtopts

* remove redundant .jvmopts
  • Loading branch information
joroKr21 authored and neko-kai committed Aug 29, 2019
1 parent c0aa555 commit 0f97463
Show file tree
Hide file tree
Showing 25 changed files with 712 additions and 639 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ jobs:
- checkout
- restore_cache:
key: sbt-cache-machine
- run: sbt ++2.13.0! testJS
- run:
command: sbt ++2.13.0! testJS
no_output_timeout: 30m
- save_cache:
key: sbt-cache-machine
paths:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.bloop
.metals
.sbtopts
project/.sbt
project/travis-deploy-key
project/secrets.tar.xz
Expand Down
1 change: 0 additions & 1 deletion .jvmopts

This file was deleted.

5 changes: 5 additions & 0 deletions .sbtopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-J-Xss5M
-J-XX:ReservedCodeCacheSize=256m
-J-Xmx4G
-J-XX:MaxMetaspaceSize=3G
-J-XX:MaxInlineLevel=18
14 changes: 4 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,14 @@ lazy val interopCats = crossProject(JSPlatform, JVMPlatform)
"dev.zio" %%% "core-tests" % "1.0.0-RC11-1" % Test classifier "tests",
"org.specs2" %%% "specs2-core" % "4.7.0" % Test,
"org.specs2" %%% "specs2-scalacheck" % "4.7.0" % Test,
"org.specs2" %%% "specs2-matcher-extra" % "4.7.0" % Test
"org.specs2" %%% "specs2-matcher-extra" % "4.7.0" % Test,
"org.typelevel" %%% "cats-effect-laws" % "2.0.0-M5" % Test,
"org.typelevel" %%% "cats-testkit" % "2.0.0-M4" % Test,
"org.typelevel" %%% "cats-mtl-laws" % "0.6.0" % Test
)
)

lazy val interopCatsJVM = interopCats.jvm
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect-laws" % "2.0.0-M5" % Test,
"org.typelevel" %% "cats-testkit" % "2.0.0-M4" % Test,
"org.typelevel" %% "cats-mtl-laws" % "0.6.0" % Test,
"com.github.alexarchambault" %% s"scalacheck-shapeless_1.14" % "1.2.3" % Test
)
)

lazy val interopCatsJS = interopCats.js
.settings(
libraryDependencies += "org.scala-js" %%% "scalajs-java-time" % "0.2.5" % Test
Expand Down
21 changes: 0 additions & 21 deletions interop-cats/js/src/main/scala/zio/interop/catsjs.scala

This file was deleted.

317 changes: 0 additions & 317 deletions interop-cats/jvm/src/main/scala/zio/interop/catsjvm.scala

This file was deleted.

Loading

0 comments on commit 0f97463

Please sign in to comment.