zio / zio-project-seed.g8

giter8 template used to start new ZIO projects for the ZIO organization
Apache License 2.0
21 stars 22 forks source link

Add Cross-Platform Support #5

Open adamgfraser opened 4 years ago

adamgfraser commented 4 years ago

Currently it looks like this template does not support ScalaJS. I think we want to provide cross-platform and cross-version support across ZIO projects wherever possible. Having this as part of the template would be one less thing contributors have to worry about and would minimize effort for adding it later and risks that it will not be done in the optimal way.

DamianReeves commented 4 years ago

Let's quantify cross-platform. Is ScalaJS enough, or do we want to shoot for scala native as well. Adding scala-native support scares me (but I might be able to navigate my way through scalajs).

adamgfraser commented 4 years ago

I would say that since at this point we are still working to get functionality in ZIO core working on Scala Native it wouldn't make sense for other ZIO ecosystem projects to publish for Scala Native at this point. So I would initially focus just on ScalaJS.

DamianReeves commented 4 years ago

Should we include scala 2.11? I think Spark developers are still interested in this (its easier to remove than to add it back), though this one isn't as bad.

adamgfraser commented 4 years ago

I would say yes.

DamianReeves commented 4 years ago

I'm no expert here, so I'm wondering, are there specific compiler flags we want set for scala 2.11, 2.12, 2.13, and scalajs? I know we had segregated 2.12 and 2.13 to this point, does there need to be further breakdown?

adamgfraser commented 4 years ago

I would take a look at the ZIO repository for the best state of our knowledge on this, though I don't know if there can be further improvements from that.

er1c commented 4 years ago

I think this is done/should be closed (or renamed)

it generates the scalajs:

lazy val fooJS = foo.js
  .settings(scalaJSUseMainModuleInitializer := true)

lazy val fooJVM = foo.jvm
  .settings(dottySettings)