question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Give scala-native a try

See original GitHub issue

It should be possible to have a workish scala-native command-line tool, by taking a few shortcuts. It’d be interesting to compare the perf of such a tool to its JVM counterpart.

Among the points to address / circumvent:

  • use scalaz 7.3.0-M10 (hoping the sources of coursier are fine with it),
  • don’t depend on fastparse, which doesn’t seem to be compiled for scala-native (temporary, only used to parse Ivy “patterns” - either remove support for Ivy repos, or use an old dependency-free workish implem of the parser),
  • concurrency: on the JVM, it is brought by the use of scalaz.concurrent.Task as a monad. Something like cats.Eval (don’t know the scalaz equivalent) could be used instead, to effectively disable concurrency.
  • IO: in a first time, a cache-less coursier.Fetch could be implemented, so that only network stuff would have to be handled (with libcurl?) It already works this way with scala-js in the web module.

With all these points worked around, a workish scala-native-based command-line tool should be able to run resolutions.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:7
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
alexarchambaultcommented, Mar 15, 2018

I might give it a try again, using libuv (spotted here).

1reaction
jgogstadcommented, Apr 27, 2019

@rwhaling also provides an example of a libuv driven ExecutionContext in Modern Systems Programming with Scala Native (it looks to be the topic of this talk on ScalaDays 2019 as well)

You can get the source code from the docker image he ships with the book

Read more comments on GitHub >

github_iconTop Results From Across the Web

scala-native/scala-native - Gitter
Is there a way to examine the LLVM IR generated by Scala Native? ... If you would like to track your code in...
Read more >
Support Scala Native · Issue #1172 · scalameta/scalafmt
For people interested in native scalafmt, please give the branch in #1266 a try and report back how it works :) All ...
Read more >
Scala Native Documentation
This documentation is divided into different parts. It's recommended to go through the User's Guide to get familiar with Scala Native.
Read more >
An introduction to Scala Native | Let's talk about Scala 3
In the eleventh video in the "Let's talk about Scala 3" series, Wojciech Mazur, a software developer at VirtusLab and a Scala Center ......
Read more >
How Scala Native works | Features | Example - eduCBA
This often comes when we try to access a null object that means an object ... Scala native also provides us with some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found