Releases: typelevel/spire
v0.18.0
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
v0.18.0-M3
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
- migrate caliper to jmh by @i10416 in #1122
- ensure fastForInline does not make closures by @bishabosha in #1111
- Rename
fastFor
back tocfor
by @armanbilge in #1137
New Contributors
- @bishabosha made their first contribution in #1111
Full Changelog: v0.18.0-M2...v0.18.0-M3
v0.18.0-M2
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
- 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
- Deprecate
NoImplicit
in favor ofNotGiven
by @cquiroz in #1098 - Improve docs by @i10416 in #1095
- rename traversable to iterable by @i10416 in #1107
- hygene macros by @i10416 in #1109
- Update to algebra 2.7.0 by @armanbilge in #1115
New Contributors
Full Changelog: v0.18.0-M1...v0.18.0-M2
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: #1067 (comment).
Migration guide
- parentheses: these are now omitted for 0-arity (empty-parens) methods with no side-effects.
cfor
macros: replaced byfastFor
in Scala 3 and deprecated in Scala 2. Thecfor
macro has complex semantics in certain edge cases. The newfastFor
macro in Scala 3 simplifies those semantics. AfastFor
reference implementation is provided in Scala 2 with semantics matching the Scala 3 macro. Performance-sensitive code should continue usingcfor
on Scala 2.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!
Full Changelog: v0.17.0...v0.18.0-M1