v0.18.0-M1
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: https://github.com/typelevel/spire/pull/1067#issuecomment-939369626.
Migration guide
- parentheses: these are now omitted for 0-arity (empty-parens) methods with no side-effects.
cformacros: replaced byfastForin Scala 3 and deprecated in Scala 2. Thecformacro has complex semantics in certain edge cases. The newfastFormacro in Scala 3 simplifies those semantics. AfastForreference implementation is provided in Scala 2 with semantics matching the Scala 3 macro. Performance-sensitive code should continue usingcforon Scala 2.Checkedmacros: very nearly ported in whole (!), except fortryOrReturnwhich can be replaced withtry/catchandreturn.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: https://github.com/typelevel/spire/compare/v0.17.0...v0.18.0-M1