-
Notifications
You must be signed in to change notification settings - Fork 225
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
Port Scalameta to Scala Native #772
Comments
@densh I'm sure you can answer a lot of these questions I have. |
This was one big motivation for porting to Scala.js/crossProject. I already tested the waters by trying to build scalafmt against scala-native, which resulted in these linking errors scala-native/scala-native#557 |
@olafurpg Most of the linking errors from that list are done now, we should retry and see if there is anything missing still. |
@densh I just opened scalameta/scalafmt#898 porting scalafmt-core to Scala.js. We can work from that branch to try build scalafmt with native, I don't suspect we won't hit on any linking errors in core, but maybe we need more work in scalafmt-cli. I will try to look into porting to native tomorrow. |
Amazing news! Can we get these changes in? Is the entire test suite
crosscompiling?
…On Thu, 27 Apr 2017 at 04:49, Ólafur Páll Geirsson ***@***.***> wrote:
I am super excited to confirm that scalafmt links with scala-native 0.2!
[image: scalafmt-native]
<https://cloud.githubusercontent.com/assets/1408093/25481965/f4d2da18-2b4f-11e7-91df-125f818ab82e.gif>
Getting it to work only required removing a single Enumeration in the
scalameta parser since it seems those use runtime reflection. The rest was
simple build changes.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#772 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAlLgCh9wUlxInQ3iF4mT8u2UvC1JA1qks5r0IDHgaJpZM4MsX58>
.
|
(Moved to description) |
@densh Can you comment on what it would take to support these libraries? |
I have no data on scalatest as they have rather complicated build that's not easily migratable to native. utest/sourcecode/fastparse seem to have enough APIs implemented in 0.2 already, it's just a matter of cross-publishing it, build changes are trivial. We can't run the tests automatically from the sbt yet due to scala-native/scala-native#339, but @Duhemm might have time to look at it in 0.3 milestone. Scalacheck should be either working already or require minimum changes from us to support it. |
Fastparse 0.4.4 is out now with native support. Only remaining dependency is ScalaTest. Our options are to either
I lean towards the second option. utest assert macro error messages are IME better than scalatest macro assert errors so I wouldn't mind switching to utest. Once com-lihaoyi/utest#113 is merged then utest will also have pretty console reports. |
👍 for writing a FunSuite wrapper for uTest. |
👍 |
I tried crosscompiling a small part of Scalameta to Native, and it worked pretty well, except for a minor inconvenienced described in #1228 (comment). All in all, this looks doable, and I'm looking forward to a native build of Scalatest to commence a full-scale migration. |
scalatest 3.2 SNAP release is due out this week with native support! https://gitter.im/scalatest/scalatest?at=5a660edc517037a212dc18ee |
\o/ Thank you, @bvenners! |
Issue with artifact names has been fixed by @sjrd (portable-scala/sbt-crossproject#81) and is going to be part of the next release of sbt-crossproject. |
@densh Thanks for the great news! Is there a gitter channel or something where you guys announce new releases? |
I announced the release on Twitter a few hours ago ;) |
I started working on crosscompilation to native in https://github.com/xeno-by/scalameta/tree/topic/native. Here's a problem that I ran into:
@densh, can you comment? Is this a native bug? If yes, is there a workaround that would allow me to ignore it and make progress regardless? upd. Renaming upd. Submitted a ticket at scala-native/scala-native#1155. |
Here's another problem that I ran into. This one may be related to ScalaTest:
@bvenners, any idea what could be causing the issue? upd. Moving the test suite from the root package to any other package successfully works around the problem (xeno-by@44f57a0). |
Looks like https://github.com/scala-native/scala-native/blob/17cf3c557a10b63898b2fa4251b8a298177716df/sbt-scala-native/src/main/scala/scala/scalanative/sbtplugin/TestUtilities.scala#L38 is generating the tests map with @Duhemm would it be possible to generate the |
I've just submitted a pull request with the first stab at crosscompiling Scalameta to Scala Native: #1243. I had to apply several workarounds, but I managed to get testsNative/test to green state. If you're interested, check out the pull request for details. |
Here's another pull request that crosscompiles just |
Successfully merged #1263 and published a Scala Native build of |
Fixed in #1529, native support for scalameta + contrib modules has been merged into master 🚀 |
Given that SJS support was just added, It seems like SN support should be somewhat trivial now that we are not platform specific. I could be wrong, so lets see what actually needs to be done.
Here are the scalameta dependencies
Further tasks:
The text was updated successfully, but these errors were encountered: