Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala.js support in macroUtils, tagged and opaque #259

Merged
merged 3 commits into from
Dec 8, 2022

Conversation

adpi2
Copy link
Contributor

@adpi2 adpi2 commented Dec 8, 2022

No description provided.

Slick is not available in Scala.js.
So pl.iterators.kebs.tagged.slick is only available on the JVM.
And the related tests are only running on the JVM.
@@ -16,7 +16,7 @@ lazy val baseSettings = Seq(
organizationName := "Iterators",
organizationHomepage := Some(url("https://iterato.rs")),
homepage := Some(url("https://github.com/theiterators/kebs")),
scalacOptions := Seq("-deprecation", "-unchecked", "-feature", "-encoding", "utf8")
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-encoding", "utf8")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sbt-scalajs plugin also adds some scalacOptions.

@@ -104,20 +104,19 @@ def paradisePlugin(scalaVersion: String): Seq[ModuleID] =
else
Seq.empty

val scalaTest = "org.scalatest" %% "scalatest" % "3.2.14"
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.17.0"
val scalaTest = Def.setting("org.scalatest" %%% "scalatest" % "3.2.14")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The %%% needs to acces the Scala.js settings, so we need to enclose that in a setting too.

Comment on lines +16 to +19
if (!isScalaJS) {
property("string should not be equivalent to other reference of same string") = forAll { (stringValue: String) =>
!areEquiv(stringValue, new String(stringValue))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Scala.js specifiaction is different from the JVM one here. So the test would fail if we run it on Scala.js. Same for the two other tests below.

Copy link
Contributor Author

@adpi2 adpi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds Scala.js support in macroUitls, tagged and opaque.

Slick is not available on Scala.js so there is no SlickSupport in tagged on Scala.js. As a consequece there is no tests on tagged for Scala.js.

I was not able to cross compile other projects with Scala.js because of the dependency to instances which uses Java time and Currency from the JDK. Those are not implemented in the JDK implementation of Scala.js. For Java time we could use cquiroz/scala-java-time.

@luksow
Copy link
Contributor

luksow commented Dec 8, 2022

@pk044 can you review & merge please?

We should also ASAP look into #212 as it's gonna be more problematic going forward (and onto kebs 2).

@luksow luksow requested a review from pk044 December 8, 2022 13:50
@pk044
Copy link
Collaborator

pk044 commented Dec 8, 2022

@adpi2 thank you for the PR! 🙏

@pk044 pk044 merged commit 7f3cade into theiterators:master Dec 8, 2022
@pk044 pk044 mentioned this pull request Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants