Changelog History
Page 1
-
v0.4.0 Changes
May 24, 2019π This release is a first public preview of the features an changes coming 0.4.0 final. Some of the major highlights are listed below, for a full list of changes please see the following page.
π Performance improvements π
(by @densh and @valdisxp1)
β‘οΈ As announced earlier, Scala Native 0.4.0 is going to feature a brand new whole-program optimizer called Interflow. See the original announcement for additional technical details on how it works under the hood.
β Additionally, we also have a number of GC performance improvements that made major impact on allocator performance of our Immix garbage collector and also reduce the overhead of the GC metadata. To get best performance one has to use a new flag for enabling LTO across C/Scala boundary
nativeLTO := "thin"
. See the sbt plugin docs for more details.The combination of these two changes gives us following speedups on our benchmarks:
π Library improvements and bugfixes π π
π New regex implementation (by @LeeTibbert, @techaddict, @MasseGuillaume, @densh)
π Previously we used to have a dependency on C-based RE2 implementation for regular expressions. In 0.4.0 we've ported the regex engine to Scala to remove that dependency. This would also allow us to narrow the gap between JDK and Scala Native regex treatment over time.
Bundle libunwind with Scala Native (by @shadaj)
π Thanks to this change and new regex engine, we don't have any more 3-rd party library dependencies in the core. See latest setup instructions for the simplified environment setup instructions.
π New toString implementation (by @LeeTibbert)
π Scala Native now uses a port of ulfjack/ryu for floating point to string conversions. This has major performance improvements on benchmarks that rely on this functionality on the hot path as described in the original paper. Additionally make string formatting of
Float
andDouble
much more inline with formatting of the reference on the JVM.π Countless other changes to improve library compatibility and fix bugs. See the link in the beginning for the complete list of changes.
π± Interoperability changes π
(by @densh)
0.4.0 is going to feature a revised interoperability layer. Some of the key changes:
- The previous
scalanative.native
namespace has been split intoscalanative.unsafe
,scalanative.annotation
,scalanative.unsigned
andscalanative.libc
. - All of the interop types such as
Ptr
,CStructN
andCArray
are now well-behaved with respect to boxing. This allows those types to be used as elements of Scala collections for example. - All of the interop types are now well-behaved with respect to generics via
unsafe.Tag
(similar toreflect.ClassTag
). This allows one to abstract over elements ofPtr
andCArray
types and perform operations on those elements generically. - π
Function pointers have a new SAM-based encoding via
CFuncPtrN
. Unlike previous design new function pointers are aimed primarily at providing callbacks to Scala back from C. They are not compiled as raw C-style function pointer but rather a managed object that gets turned into function pointer on the C boundary. - π Varargs are now compiled to
va_list
instead of C's...
. Support for...
has been dropped. This fixes a number of issues with older vararg implementation making varargs behave well when used together with boxing or generics. _N
accessors don't require additional dereference when used for accessing struct fields. If you used to rely on previous behavior to get a pointer at the field element, useatN
instead.
π Tooling and build improvements π§
(by @densh and @LeeTibbert)
- π
release
mode has been split intorelease-fast
(faster to compile, less optimizations, best binary size) andrelease-full
(slower to compile, all optimizations, worst binary size).release
mode now aliases torelease-full
. - π new
nativeLTO
,nativeCheck
andnativeDump
sbt settings. See the docs for details. - π improved linking error diagnostics by showing a stack traces that lead to a missing symbol.
- π numerous compilation performance and toolchain scalability improvements.
- resolved a long standing bug (#375) in linking across the JDK boundary via new rewritten reachability analysis.
- β resolved a long standing bug (#1008) in unit testing layer that used to caused crashes when running with large number of unit tests suites.
- 0οΈβ£ automatically discover clang 7 and 8 by default.
π± License change π
Similarly to the Scala project itself, Scala Native is now licensed under Apache License 2.0.
Contributors π₯
π According to
git shortlog -sn --no-merges v0.3.8..v0.4.0-M2
, 15 people contributed over 170 pull requests to this release: Denys Shabalin, LeeTibbert, Eric K Richardson, Valdis Adamsons, Darcy Shen, Shadaj Laddad, Nadav Samet, Naohisa Murakami, PaweΕ Cejrowski, Jorge, Dubray Alexandre, Jimin Hsieh, Jonas Fonseca, Andrew Smith, Lorenzo Gabriele.π± Thank you all! β¨ π° β¨
- The previous
-
v0.4.0-M2 Changes
May 24, 2019π This release is a first public preview of the features an changes coming 0.4.0 final. Some of the major highlights are listed below, for a full list of changes please see the following page.
π Performance improvements π
(by @densh and @valdisxp1)
β‘οΈ As announced earlier, Scala Native 0.4.0 is going to feature a brand new whole-program optimizer called Interflow. See the original announcement for additional technical details on how it works under the hood.
β Additionally, we also have a number of GC performance improvements that made major impact on allocator performance of our Immix garbage collector and also reduce the overhead of the GC metadata. To get best performance one has to use a new flag for enabling LTO across C/Scala boundary
nativeLTO := "thin"
. See the sbt plugin docs for more details.The combination of these two changes gives us following speedups on our benchmarks:
π Library improvements and bugfixes π π
π New regex implementation (by @LeeTibbert, @techaddict, @MasseGuillaume, @densh)
π Previously we used to have a dependency on C-based RE2 implementation for regular expressions. In 0.4.0 we've ported the regex engine to Scala to remove that dependency. This would also allow us to narrow the gap between JDK and Scala Native regex treatment over time.
Bundle libunwind with Scala Native (by @shadaj)
π Thanks to this change and new regex engine, we don't have any more 3-rd party library dependencies in the core. See latest setup instructions for the simplified environment setup instructions.
π New toString implementation (by @LeeTibbert)
π Scala Native now uses a port of ulfjack/ryu for floating point to string conversions. This has major performance improvements on benchmarks that rely on this functionality on the hot path as described in the original paper. Additionally make string formatting of
Float
andDouble
much more inline with formatting of the reference on the JVM.π Countless other changes to improve library compatibility and fix bugs. See the link in the beginning for the complete list of changes.
π± Interoperability changes π
(by @densh)
0.4.0 is going to feature a revised interoperability layer. Some of the key changes:
- The previous
scalanative.native
namespace has been split intoscalanative.unsafe
,scalanative.annotation
,scalanative.unsigned
andscalanative.libc
. - All of the interop types such as
Ptr
,CStructN
andCArray
are now well-behaved with respect to boxing. This allows those types to be used as elements of Scala collections for example. - All of the interop types are now well-behaved with respect to generics via
unsafe.Tag
(similar toreflect.ClassTag
). This allows one to abstract over elements ofPtr
andCArray
types and perform operations on those elements generically. - π
Function pointers have a new SAM-based encoding via
CFuncPtrN
. Unlike previous design new function pointers are aimed primarily at providing callbacks to Scala back from C. They are not compiled as raw C-style function pointer but rather a managed object that gets turned into function pointer on the C boundary. - π Varargs are now compiled to
va_list
instead of C's...
. Support for...
has been dropped. This fixes a number of issues with older vararg implementation making varargs behave well when used together with boxing or generics. _N
accessors don't require additional dereference when used for accessing struct fields. If you used to rely on previous behavior to get a pointer at the field element, useatN
instead.
π Tooling and build improvements π§
(by @densh and @LeeTibbert)
- π
release
mode has been split intorelease-fast
(faster to compile, less optimizations, best binary size) andrelease-full
(slower to compile, all optimizations, worst binary size).release
mode now aliases torelease-full
. - π new
nativeLTO
,nativeCheck
andnativeDump
sbt settings. See the docs for details. - π improved linking error diagnostics by showing a stack traces that lead to a missing symbol.
- π numerous compilation performance and toolchain scalability improvements.
- resolved a long standing bug (#375) in linking across the JDK boundary via new rewritten reachability analysis.
- β resolved a long standing bug (#1008) in unit testing layer that used to caused crashes when running with large number of unit tests suites.
- 0οΈβ£ automatically discover clang 7 and 8 by default.
π± License change π
Similarly to the Scala project itself, Scala Native is now licensed under Apache License 2.0.
Contributors π₯
π According to
git shortlog -sn --no-merges v0.3.8..v0.4.0-M2
, 15 people contributed over 170 pull requests to this release: Denys Shabalin, LeeTibbert, Eric K Richardson, Valdis Adamsons, Darcy Shen, Shadaj Laddad, Nadav Samet, Naohisa Murakami, PaweΕ Cejrowski, Jorge, Dubray Alexandre, Jimin Hsieh, Jonas Fonseca, Andrew Smith, Lorenzo Gabriele.π± Thank you all! β¨ π° β¨
- The previous
-
v0.4.0-M1 Changes
May 24, 2019π This release has accidentally broken compatibility with JDK8, please use 0.4.0-M2 instead.
-
v0.3.9 Changes
April 23, 2019π This release has been championed by @ekrich to enable ekrich/sconfig and scalameta/scalafmt cross-compiling to Scala Native 0.3.x. Special thanks to him for this effort! π
π± Library improvements π
π #1419 Add forwarders to support sconfig and scalafmt (by @ekrich)
π #1429 Move UnicodeBlock and Subset under Character object (by @thesamet)
#1452 Add java.util.IdentityHashMap (by @ekrich)
β¨ #1488 Enhance java.io.File to support URI (by @ekrich)
#1489 Add minimal java.time.Duration (by @ekrich)
#1490 Add unimplemented method to java.util.Properties (by @ekrich)
#1492 Add stubs to URL and URLConnection (by @ekrich)
#1514 Add a few more forwarders to scalafmt to link (by @densh)π Bugfixes π
π #1486 Support assignment to extern variables (by @jonas)
Contributors π₯
π According to
git shortlog -sn --no-merges v0.3.8..v0.3.9
, 4 people contributed to this release: Eric K Richardson, Denys Shabalin, Jonas Fonseca, Nadav Samet.π± Thank you all! β¨ π° β¨
-
v0.3.9-docs
April 23, 2019 -
v0.3.8 Changes
July 16, 2018π This release focuses on compatibility and performance improvements in the library code, keeping backward binary compatibility with previous releases in 0.3.x series.
π± Highlights β¨
π± Default garbage collector ποΈβ»οΈ
(by @ekrich)
π Starting from 0.3.8, Immix is the default garbage collector. Over the past year of testing, we confirmed that it offers major performance improvements over the Boehm GC. To revert back to the previous collector you can set the following setting in your build file:
nativeGC := "boehm"
π Improved performance of File I/O πΎ
π 0.3.8 provides a series of library improvements that aim to increase the performance of the NIO library layer for File I/O operation. Changes include major speedups across reading, writing and walking file trees.
π Test runner for 3-rd party build tools ποΈ
(by @Duhemm)
π In 0.3.7 we introduced a Build tool API interface that simplifies integration of Scala Native toolchain into 3-rd party build tools. In 0.3.8 we expand this to also include preliminary support for running tests through newly factored out unit test runner.
π Library and performance improvements ππ
π #975 Preliminary support for
java.security.Timestamp
(by @xavier-fernandez)
β‘οΈ #1129 Optimize UnixPath and add WalkFileTree benchmark (by @henrymai)
#1187 Add java.util.function.{Supplier, UnaryOperator} (by @jiminhsieh)
#1200 Fix FileChannel.read to have same semantics as JVM (by @dlpatri)
π #1216 Performance and compatibility improvements to File I/O (by @eatkins)
#1218 Add additional system properties (by @eatkins)
#1219 Add shell fallback for processes (by @eatkins)
β‘οΈ #1220 Add optimized split (by @eatkins)
#1221 Implement Runtime.exec (by @eatkins)
π #1222 Add preliminary support for File.deleteOnExit and runtime support for shutdown hooks (by @eatkins)
#1235 Add bindings for float.h (by @kornilova-l)
#1236 Fix typo in wrap.c that causes two math.h bindings to fail (by @kornilova-l)
#1237 Add java.util.function.BiFunction (by @vaartis)
0οΈβ£ #1238 Make Immix the default garbage collector (by @ekrich)
#1243 Add helper methods to time.h bindings (by @LeeTibbert)
#1243 Improve bindings for sys/types.h (by @LeeTibbert)
#1244 Improve doc links to posix bindings (by @LeeTibbert)
#1246 Implementation of Enum.equals/Enum.hashCode (by @cquiroz)
β #1250 #1251 Improve unit tests for time.h bindings (by @LeeTibbert)
#1261 Fix bug related to attribute handling in File I/O (by @LeeTibbert)
π» #1263 Correct the exception type thrown by String.getBytes (by @coreyoconnor)
#1267 Add java.net.URLEncoder (by @xuwei-k and @coreyoconnor)
#1269 Decouple s.c.i.Range from formatters (by @densh)π Tooling improvements and bugfixes π§π
#1217 Fix regex semantics (by @eatkins)
#1224 Match Scala JVM hash codes for case classes (by @shadaj)
β #1234 Split test-runner out of sbt plugin (by @Duhemm)
#1265 Reorder linker options to pass -l options last (by @jonas)
#1271 Scala Native 0.3.7 ignores nativeCompileOptions (by @LeeTibbert)
#1273 Explicitly set C standard while compiling C code (by @eatkins)Contributors π₯
π According to
git shortlog -sn --no-merges v0.3.7..v0.3.8
, 17 people contributed to this release: LeeTibbert, Ethan Atkins, Denys Shabalin, Corey O'Connor, Jimin Hsieh, Liudmila Kornilova, Martin Duhem, henrymai, Kenji Yoshida, vaartis, Carlos Quiroz, David Patrick, Eric K Richardson, Jonas Fonseca, PaweΕ Krupa, Shadaj Laddad, Xavier FernΓ‘ndez Salas.π± Thank you all! β¨ π° β¨
-
v0.3.7 Changes
March 29, 2018π 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 forjava.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 withCFunctionPtr
(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! β¨ π° β¨
-
v0.3.6 Changes
December 13, 2017π This is a hotfix release to address #1118. See 0.3.5 release notes for full list of changes.
-
v0.3.5 Changes
December 28, 2017π This release focuses on performance and stability improvements, keeping backwards binary compatibility with previous releases in 0.3.x series. It includes exactly the same changes as 0.3.4, with a hotfix for broken sbt 1.0 plugin.
Note : See also 0.3.6.
π Performance improvements π
#1084 Devirtualize trait methods with 1 or less implementations (by @densh)
#1085 #1114 Improve heuristic for heap growth in Immix GC (by @densh)
#1088 Use AnyRefMap as a foundation for java.util.HashMap (by @densh)
#1089 Faster String::{equals, hashCode} (by @densh)π± Library improvements π
β #1080 Port of java.nio buffers and tests from Scala.js (by @asoltysik)
#1093 Implement posix syslog extern bindings (by @adam-singer)
#1107 Add chdir to posix/unistd bindings (by @wookietreiber)π± Tooling improvements π§
π #1039 #1096 Add support for sbt 1.0 (by @MasseGuillaume)
π #1075 Add support Scala 2.11.12 (by @ekrich)
#1051 Automatically detect LLVM 5.0 binaries (by @ekrich)π Bugfixes π
#1009 #1057 Improve stability of
GlobalBoxingElimination
pass (by @densh)
β #1013 #1031 Make suresbt test
works if no tests are present (by @ekrich)
#1015 Use JavaConverters instead of JavaConversions in javalib (by @piotrkwiecinski)
#1019 Shift should always coerce to left hand side type (by @densh)
#1021 Make UTF-8 decoder initialization lazy (by @densh)
#1024 Fix resource leaks injava.nio.file
(by @Daemonhost)
π #1026 #1112 Add support for System.getProperty("user.home") (by @ekrich)
π #1027 Add support forArrayList.contains
(by @cquiroz)
#1037java.lang.String.toCase
should consider String's offset (by @Daemonhost)
#1043 Fix signature forsleep
inunistd.h
bindings (by @Daemonhost)
#1044 Make InetAddress a concrete class instead of abstract (by @asoltysik)
π #1047Double.parseDouble
and andFloat.parseFloat
throwNumberFormatException
when given bad data (by @longshorej)
#1048 Fix the slow execution of theCfChainsSimplification
pass (by @hkapp)
βοΈ #1081 Add Fedora setup to the docs and fix typos (by @pbatko)
#1101 Simplify stack trace element caching (by @densh)
#1105 Report error on extern function without return type (by @pbatko)
#1109 Use correct naming for libc math macros (by @techaddict)Contributors π₯
π According to git shortlog -sn --no-merges v0.3.3..v0.3.5, 15 people contributed to this release: Denys Shabalin, Eric K Richardson, Victor Burkhovetskiy, Adam Singer, Andrzej SoΕtysik, Pawel Batko, Christian Krause, Hugo Kapp, Jason Longshore, Martin Duhem, Carlos Quiroz, Piotr Kwiecinski, Sandeep Singh, Shunsuke Otani, Guillaume MassΓ©.
π± Thank you all! β¨ π° β¨
-
v0.3.4 Changes
December 13, 2017π This is a broken release due to a buggy port to sbt 1.0. Upcoming 0.3.5 is going to hotfix the problem.