Open reibitto opened 4 years ago
There are some limits to using scala native's process builder. Using it myself, I found myself having problems doing process to process streaming cause of some weird crashes.
Here's a gist for a scala native implementation of a Process ZLayer. You'll note that it doesn't do a lot of what java's process builder does, and that's because I figure streams make a lot of what process builder helps do easier. Regarding killing processes, I figured I'd add a promise to the interface that could be triggered to have the process killed.
Hope this helps.
Thanks for the information and spending time investigating. 🙂
Scala Native is still experimental enough that I'm not too eager to spend too much time on it just yet, but it's something that I'll eventually get to if nobody decides to get a PR going before me.
Process
and ProcessBuilder
are listed on this page but I guess there are still unresolved issues with it as you've found. Ideally those issues would get fixed upstream (or we fix them if it's doable) rather than creating and maintaining a separate implementation ourselves. That would require code splitting, which is a valid approach, but not really the one I'd like to go with until it's clearer what the Scala Native ProcessBuilder
bug/issue is. I can't find any issues relating to Process
in the Scala Native repo yet. Might need to create a minimal example of the issue first to find out more.
/bounty $350
💎 $350 bounty created by ZIO
🙋 If you start working on this, comment /attempt #4
to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #4
somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to zio/zio-process!
👉 Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🟢 @pablf | #397 |
💡 @pablf submitted a pull request that claims the bounty. You can visit your bounty board to reward.
🎉🎈 @pablf has been awarded $350! 🎈🎊
This may not actually require any code changes. From what I can tell, Scala Native already supports Java's
ProcessBuilder
interface (which is what ZIO Process is based on).It's a matter of trying it out and seeing where Scala Native support for ZIO is. I believe it's still a work in progress but works to some degree.