Skip to content

v0.18.0

Latest
Compare
Choose a tag to compare
@armanbilge armanbilge released this 17 Jun 15:55
· 143 commits to main since this release
e110f6e

This is the first release in the v0.18.x series of Spire. It is published for Scala 2.13 and 3.1+ with Scala.js 1.8+ and Scala Native 0.4. Note that it is not binary compatible with v0.17.0.

Leading up to this release there were three milestones: v0.18.0-M1, v0.18.0-M2, and v0.18.0-M3. Their release notes are summarized below.

Scala 3 support

A big round of applause for @cquiroz for his multi-month, multi-PR effort to cross-compile Spire for Scala 3, including porting "unportable" macros. A heroic effort, which culminated in #1067. Also special thanks to @bishabosha for porting the cfor macros in #1111.

Performance

Scala 3 does not support specialization for type parameters, so code relying on this feature takes a severe performance hit. Otherwise, benchmarks suggest that performance on Scala 3 roughly matches Scala 2.

The complete benchmark suite run for 2.13 vs 3 is available here: #1067 (comment).

Migration guide

  • parentheses: these are now omitted for 0-arity (empty-parens) methods with no side-effects.
  • Checked macros: very nearly ported in whole (!), except for tryOrReturn which can be replaced with try / catch and return.
  • Literals: all ported to Scala 3, except radix literals.

Deprecated and/or unported features

UnboundSyntax and Machinist macros, Fpf, and Auto macros. Some of these could be ported in a later release, but don't count on it!

Algebra v2.8.0

Several typeclasses that originated in Spire were ported to Algebra in its v2.7.0 release. While updating in #1115 we removed the following typeclasses from Spire and replaced them with type aliases pointing to the Algebra implementations.

  • GCDRing
  • EuclideanRing
  • DivisionRing
  • Signed / SignedAdditiveCMonoid/ SignedAdditiveAbGroup
  • TruncatedDivision / TruncatedDivisionCRing
  • Field

Note that in Algebra Signed no longer extends Order. So in many places an additional Order constraint has to be added where previously Signed was sufficient.

User-facing PRs

Behind-the-scenes

New Contributors

Thank you wonderful contributors!!

Full Changelog: v0.17.0...v0.18.0