-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Support Scala Native 0.4.0 #1108
Conversation
- Drop support for Scala Native 0.3 - Remove `Release` ReleaseMode - Make `nativeTarget` `Option[String]` like upstream - Rewrote tests to JUnit. Since Scala Native ships with JUnit and Utest depends on Mill itself we can't use it to test Mill. JUnit is the official testing framework and stresses all the features that were tested with Utest and Scalatest - Testing Scala Native for Scala 2.11, 2.12 and 2.13 - Move worker again into the `0.4` folder. It was moved outside using `def millSourcePath = super.millSourcePath / os.up` to reuse the code between worker `0.3` and `0.4`. Since now we're dropping `0.3` it doesn't make sense anymore to do this, and we can be prepared for a future 0.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for keeping Scala Native support up-to-date (and ahead)! I had a quick look at it. Looks good so far. I added some comments. And we still need to wait for 0.4.0 release to really test it.
override def sources = T.sources{ millSourcePath / "src" / "no-tests" } | ||
def testFrameworks = Seq("com.novocode.junit.JUnitFramework") | ||
override def ivyDeps = Agg( | ||
ivy"org.scala-native::junit-runtime::$sNativeVersion" | ||
) | ||
override def compileIvyDeps = Agg( | ||
ivy"org.scala-native:::junit-plugin:$sNativeVersion" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a repetitiion of the JUnit-variant. Maybe, we can have it in a shared trait?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted on a separate trait ✅
@@ -0,0 +1,14 @@ | |||
package mill.scalanativelib.api; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This source files should be located in a directory structure reflecting the package name. The Java Standard isn't as flexible as the Scala one. Beside the fact that it just works with zinc, it won't for pure Java compiler.
Same, for all other Java files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lefou You're right! Moved them ✅
- Move Java file to a directory structure based on package - Fix not compiling tests - Extract JUnit test setting in a trait in tests - Remove deprecated nativeLib config from worker It is still in ScalaNativeModule because bloop depends on it. I will remove it when Bloop will be updated to Scala Native 0.4.0 too
@lefou I tried in every way on earth to make the Scala Native JUnit framework to work on mill but I can't make it work. |
36b33e4
to
36067fe
Compare
@lolgab Makes sense. But I have no idea how long until a newer utest is released. Did you requested your changes for merge? Let me restart Github tests first. If everything is green, we can merge to get a new snapshot release. |
Build is green 🎉 |
Thank you! |
Release
ReleaseModenativeTarget
Option[String]
like upstreamdepends on Mill itself we can't use it to test Mill.
JUnit is the official testing framework and stresses all the features
that were tested with Utest and Scalatest
0.4
folder. It was moved outside usingdef millSourcePath = super.millSourcePath / os.up
to reuse the codebetween worker
0.3
and0.4
. Since now we're dropping0.3
itdoesn't make sense anymore to do this, and we can be prepared for a
future 0.5