Announcing Scala.js 1.5.1
Apr 1, 2021.
We are pleased to announce the release of Scala.js 1.5.1!
This release mostly contains additions and improvements in the JDK libraries. In particular, several APIs involving floating point numbers have been fixed, from parsing to bit manipulation to formatting.
Read on for more details.
If you are new to Scala.js, head over to the tutorial.
Bug reports can be filed on GitHub.
If upgrading from Scala.js 0.6.x, make sure to read the release notes of Scala.js 1.0.0 first, as they contain a host of important information, including breaking changes.
This is a patch release:
- It is backward binary compatible with all earlier versions in the 1.x series: libraries compiled with 1.0.x through 1.5.0 can be used with 1.5.1 without change.
- It is forward binary compatible with 1.5.0: libraries compiled with 1.5.1 can be used with 1.5.0 without change.
- It is backward source compatible with 1.5.0: source code that used to compile with 1.5.0 should compile as is when upgrading to 1.5.1.
In addition, like Scala.js 1.5.0:
- It is not forward binary compatible with 1.4.x: libraries compiled with 1.5.1 cannot be used with 1.4.x or earlier.
- It is not entirely backward source compatible with 1.4.x: it is not guaranteed that a codebase will compile as is when upgrading from 1.4.x or earlier (in particular in the presence of
As a reminder, libraries compiled with 0.6.x cannot be used with Scala.js 1.x; they must be republished with 1.x first.
Fixes with compatibility concerns
%g conversions in
java.util.Formatter—also used by
String.format and the
f"..." interpolator—have been fixed to match their specification on the JVM.
This may break tests that rely on the specific string output of formatting numbers.
New JDK APIs
This release contains some improvements in the JDK APIs that we support:
- All the remaining functional interfaces in
Methods with fixed or improved behavior:
java.util.Formatterand derivatives (such as
String.format) now support:
java.math.BigDecimalarguments with the
%gconversions (in addition to fixing
Doubles, as mentioned above)
parseDoubleare now accurate to 0.5 ULP, as specified
Among others, the following bugs have been fixed in 1.5.1:
java.lang.Class.getSimpleName()returns bad results for local classes
- #4452 Overloading in JS classes incorrectly forwards vararg parameters
j.m.BigDecimal.divideToIntegralValue(bi, MathContext)returns value with bogus internal
j.l.Float.parseFloat’s result is 1 ULP off of the best approximation in some cases
j.l.Double.parseDoublecan be 1 ULP off for hexadecimal parsing
j.l.Math.ulp()returns wrong results for negative values
ConcurrentHashMap.KeySetView.toStringshould print elements
You can find the full list on GitHub.