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

Add support for Scala Native #2319

Closed
sluramod opened this issue Mar 8, 2021 · 3 comments · Fixed by #2975
Closed

Add support for Scala Native #2319

sluramod opened this issue Mar 8, 2021 · 3 comments · Fixed by #2975
Labels

Comments

@sluramod
Copy link

sluramod commented Mar 8, 2021

Cats (https://github.com/typelevel/cats) recently added support (typelevel/cats#1549) for cross-compiling to scala native.

Scala Native support in fs2 would be be very helpful.

@diesalbla
Copy link
Contributor

This would of course depend on cats-effect support for Scala Native, as well. typelevel/cats-effect#1302

@armanbilge
Copy link
Member

armanbilge commented Jul 23, 2022

I started some preliminary investigation in armanbilge@20a1dbb based on typelevel/cats-effect#3057.

Crossing fs2-core is straightforward.

  • porting java.util.zip.InflaterOutputStream to Scala Native would unblock compression

fs2-io is a lot more work. I focused only on the fs2.io.file package for now.

  • java.nio.file.Path#register is missing
  • so is java.util.stream.Stream#forEach

Without those, cross-compiling fs2.io.file will require complex splitting/platforming to remove Watcher (which is otherwise very nearly supported). We should port the missing APIs to Scala Native instead.

Furthermore, when running the fs2-io suite on Native I encountered the following failures.

X fs2.io.file.FilesSuite.permissions - innappropriate access should raise AccessDeniedException
X fs2.io.file.FilesSuite.delete - should fail on a non empty directory
X fs2.io.file.PathSuite.Monoid[Path]: monoid.right identity

The underlying bugs should all be fixed in Scala Native.

PRs:

Issues:

@armanbilge
Copy link
Member

PR is up at #2975.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants