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 fortryOrReturn
which can be replaced withtry
/catch
andreturn
.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
- Dotty by @cquiroz in #1067
- Drop support for scala 2.12 by @cquiroz in #978
- Updated version info on microsite by @pinguinson in #1046
- Deprecate
NoImplicit
in favor ofNotGiven
by @cquiroz in #1098 - Improve docs by @i10416 in #1095
- rename
traversable
toiterable
by @i10416 in #1107 - hygiene macros by @i10416 in #1109
- Update to algebra 2.7.0 by @armanbilge in #1115
- ensure
fastForInline
does not make closures by @bishabosha in #1111 - Don't assume
NRoot[Real]
is perfect by @kschwarz1116 in #1173 - Cross-build for Native by @armanbilge in #1180
- Add
allButCats
syntax by @armanbilge in #1181
Behind-the-scenes
- Switch to github actions by @cquiroz in #956
- Switch to github actions by @larsrh in #963
- Switch to munit by @cquiroz in #968
- Fewer warnings by @cquiroz in #974
- scalafmt by @cquiroz in #982
- Type ascriptions by @cquiroz in #1027
- Update sbt and libs by @cquiroz in #1029
- Use the new cross-project builder command by @danicheg in #1048
- Migrate on mdoc by @danicheg in #1047
- Rename master to main by @danicheg in #1045
- Use new SBT syntax in CI pipeline by @danicheg in #1062
- Replace
cfor
withfastFor
by @armanbilge in #1077 - Dotty diff minimizing by @armanbilge in #1079
- Use sbt-ci-release by @cquiroz in #1081
- Update bundle by @armanbilge in #1082
- Set the version scheme by @cquiroz in #1085
- Remove version.sbt by @cquiroz in #1087
- Update scalafmt to 3.0.6 by @armanbilge, @cquiroz in #1084
- fix publish workflow by @i10416 in #1078
- Fix ci by @i10416 in #1093
- Show
previousStableVersion
on site if snapshot by @armanbilge in #1094 - Remove some unreachable code by @cquiroz in #1099
- Test on jdk-17 by @cquiroz in #1100
- migrate caliper to jmh by @i10416 in #1122
- Rename
fastFor
back tocfor
by @armanbilge in #1137 - Migrate to sbt-typelevel by @armanbilge in #1138
- Migrate to sbt-typelevel-site by @armanbilge in #1142
- update benchmarks by @i10416 in #1128
- Remove unused sbt plugins by @armanbilge in #1161
- format headers with brackets properly by @kschwarz1116 in #1175
- Reduce min tests for native in various scalacheck suites by @armanbilge in #1182
New Contributors
- @danicheg made their first contribution in #1048
- @pinguinson made their first contribution in #1046
- @armanbilge made their first contribution in #1077
- @i10416 made their first contribution in #1078
- @bishabosha made their first contribution in #1111
- @kschwarz1116 made their first contribution in #1173
- @typelevel-steward made their first contribution in #1177
Thank you wonderful contributors!!
Full Changelog: v0.17.0...v0.18.0