Skip to content

Releases: typelevel/spire

v0.18.0

17 Jun 15:55
e110f6e
Compare
Choose a tag to compare

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

v0.18.0-M3

07 Jan 20:38
9f82b3e
Compare
Choose a tag to compare
v0.18.0-M3 Pre-release
Pre-release

This is the third milestone (pre-)release of 0.18.0. It is not binary compatible with 0.17.0, 0.18.0-M1, or 0.18.0-M2, and may not be binary compatible with 0.18.0 final. It is published for Scala 2.13 and 3.1+, as well as Scala.js 1.8+.

If you are coming from 0.17.0 please see the release notes for 0.18.0-M1. However, there are changes in this milestone affecting the migration guide provided there, please see below.

Thanks to the work of @bishabosha in #1111, the cfor macros have now been ported to Scala 3 with semantics exactly matching the Scala 2 macros. As a result, cfor is no longer deprecated and its replacement fastFor has been removed. We apologize for the churn.

What's Changed

New Contributors

Full Changelog: v0.18.0-M2...v0.18.0-M3

v0.18.0-M2

30 Nov 15:59
610e3ed
Compare
Choose a tag to compare
v0.18.0-M2 Pre-release
Pre-release

This is the second milestone (pre-)release of 0.18.0. It is not binary compatible with 0.17.0 or 0.18.0-M1 and may not be binary compatible with 0.18.0 final. It is published for Scala 2.13 and 3.1, as well as Scala.js 1.7.

If you are coming from 0.17.0 please see the release notes for 0.18.0-M1.

The most notable change in 0.18.0-M2 was upgrading to algebra 2.7.0 in #1115. Several typeclasses in spire were ported to algebra, allowing us to remove the following typeclasses from spire and replace 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.

Finally, special thanks to @i10416 for revamping the website and other contributions!

What's Changed

New Contributors

Full Changelog: v0.18.0-M1...v0.18.0-M2

v0.18.0-M1

20 Oct 05:48
v0.18.0-M1
803b55e
Compare
Choose a tag to compare
v0.18.0-M1 Pre-release
Pre-release

This is the first milestone (pre-)release of 0.18.0. It is not binary compatible with 0.17.0 and may not be binary compatible with 0.18.0 final. It is published for Scala 2.13 and 3.1, as well as Scala.js 1.7.

Notable Changes: support for Scala 3!

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.

Various other infrastructure PRs, code, benchmarks, and reviews were contributed by @danicheg, @pinguinson, @vasilmkd, @bishabosha, and @larsrh. Much thanks to all of you!

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.
  • cfor macros: replaced by fastFor in Scala 3 and deprecated in Scala 2. The cfor macro has complex semantics in certain edge cases. The new fastFor macro in Scala 3 simplifies those semantics. A fastFor reference implementation is provided in Scala 2 with semantics matching the Scala 3 macro. Performance-sensitive code should continue using cfor on Scala 2.
  • 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!

Full Changelog: v0.17.0...v0.18.0-M1