Scala Native v0.3.7 Release Notes

Release Date: 2018-03-29 // about 6 years ago
  • πŸš€ This release focuses on stability and compatibility improvements, keeping backwards binary compatibility with previous releases in 0.3.x series.

    πŸ†• New build tool API πŸ—οΈ

    (Contributed by @Duhemm)

    πŸ— Scala Native has supported integration with sbt build tool since day 1, but it was also the only official way to compile and link applications until now.

    πŸš€ In this release we provide a new API aimed at simplifying integration of Scala Native toolchain with 3-rd party build tools (e.g. Maven, Mill) and compilation servers (e.g. Bloop). Reference integration requires just under 30 lines of code to run the whole Scala Native pipeline, LLVM and link it all to the final executable.

    πŸ‘Œ Improved cross projects 🎌

    (Contributed by @sjrd)

    πŸš€ Scala Native cross projects have been born as a generalization of Scala.js 0.6 cross projects. Since original release as scala-native/sbt-crossproject, the project has moved to portable-scala organization which contains projects shared between Scala.js and Scala Native. The API remains fully compatible with previous iteration, and one just needs to update plugin dependencies to migrate (see README for instructions).

    βž• Additionally, updated cross projects contain an ability to remove suffix for one of the platforms. For example:

    lazy val bar = crossProject(JSPlatform, JVMPlatform, NativePlatform) .withoutSuffixFor(JVMPlatform) .crossType(...) .settings(...)lazy val barJS= bar.jslazy val barJVM= bar.jvmlazy val barNative = bar.native
    

    Now JVM project ID is just bar and can be used without a suffix in sbt shell (i.e. bar/compile would compile JVM subproject).

    🍱 Library improvements πŸ“š

    #1095 #1130 Add bindings for cpio.h (by @adam-singer, @densh)
    πŸ‘ #1145 Add support for java.util.Base64 (by @xuwei-k)
    πŸ‘ #1151 Add support for POSIX setenv and unsetenv (by @ekrich)
    πŸ‘€ #1163 Add java.text.ParseException (by @xuwei-k)
    #1162 Add java.lang.System.{setInt, setOut, setErr) (by @xuwei-k)
    #929 #1170 Add bindings for time.h (by @schrepfler, @eatkins)
    πŸ‘ #1082 #1190 Add support for java.lang.{Process, ProcessBuilder} (by @eatkins)
    #1196 Add bindings for termios.h (by @ekrich)

    🍱 Tooling improvements πŸ”§

    πŸ— #1117 Improve rebuild workflow for the Scala Native build (by @ekrich)
    #1147 Migrate to portable-scala cross project infrastructure (by @sjrd, @densh)
    #1159 #1161 Java 9 compatibility (by @xuwei-k, @densh)
    #1166 Automatically discover LLVM/Clang 6.0 binaries (by @LeeTibbert)
    πŸ“¦ #1191 Don't include class files for scalalib in packaged jar by (by @Andrei-Pozolotin)
    πŸ— #1143 #1201 #1208 Build API (by @Duhemm, @densh)
    πŸ“œ #1210 Don't depend on fastparse from the tools jar (by @densh)

    πŸ›  Bugfixes πŸ›

    #1078 Fix undefined overflow of primitive 'x % -1' (by @pbatko)
    #1132 Make unchecked casts works with CFunctionPtr (by @densh)
    #1158 Fix crash when writing to a socket closed by the client (by @shadaj)
    #1156 Don't add synthetic $ suffix to impl class names (by @densh)
    #1153 Fix inconsistent behaviour in BufferedInputStream (by @felixgborrego)
    #1124 Fix inconsistent behaviour in regular expressions with empty strings (by @Kazy)

    Contributors πŸ‘₯

    πŸš€ According to git shortlog -sn --no-merges v0.3.6..v0.3.7, 13 people contributed to this release: Denys Shabalin, Andrei Pozolotin, Eric K Richardson, Kenji Yoshida, Ethan Atkins, Jocelyn Boullier, LeeTibbert, Martin Duhem, Felix Garcia Borrego, Shadaj Laddad, Srepfler Srdan, SΓ©bastien Doeraene, Pawel Batko.

    🍱 Thank you all! ✨ 🍰 ✨