Squeaked in just before the end of the year … shapeless-2.3.3 is out!
Fifty three PRs merged and fifty three issues closed from thirty four contributors, eighteen of them first-time … thanks to all of you!
See the full set of changes since 2.3.2 in the detailed release notes below …
This is the final release of shapeless-2.3.3. These release notes provide a summary of changes since shapeless 2.3.2.
53 pull requests have been merged and 53 issues have been closed and since 2.3.2 … the complete list can be found in the 2.3.3 github milestone for issues and PRs.
Important note for users of Scala 2.11.12 and 2.12.4
Recent improvements in macro hygiene in the most recent Scala compiler releases interact badly with the implementation
of shapeless’s Cached pseudo type in shapeless releases prior to this one. If you are using these Scala compiler
versions and are using Cached directly, or indirectly via a library dependency, then you might see compiler crashes
similar to the one reported here. If so then
updating your shapeless dependency to 2.3.3 should resolve the issue.
Prominent changes
- Added
OrElsecombinator, similar toOption.orElsebut at the type level. - Added
UnzipFunctionstype class which unzips an HList of unary function types to a pair of HLists of corresponding argument and result types. - Added
ZipWithandZipConsttype classes for zipping a Coproduct with an HList or repeated constant. - Reimplemented
ToInttype class via a macro materializer to improve compile time performance. - Added new syntax for creating Polys from functions,
val myPoly = Poly1.at[Int](x => x).at[String](_.length).at[Boolean](if(_) 1 else 0).build import myPoly._ myPoly(10) // 10: Int myPoly("hello") // 5: Int myPoly(true) // 1: Int - Added a
TypeOfpseudo operator which allows a type to be computed from a term in type position. This allows non-trivial types to be computed without repetition, eg.implicit val genFoo: TypeOf.`Generic[Foo]`.type = cachedImplicitHere
genFoois ascribed the narrow type inferred for the termGeneric[Foo]including thetype Reprrefinement which would otherwise have to be written explicitly. - Added
CoproductToEitherandEitherToCoproducttype classes which support conversion between coproducts and nestedEithers. - Added
MergeWithtype class which merges two records using a Poly2 to combine the values of fields which are present in both. - Added
DeepMergeandExtractortype classes for merging and extracting from nested records. - Added
Refutetype class witnessing that that no implicit instance of some typeTis available. - The
descriptionfield ofTypeablesfor simple types and case classes is now computed at compile time rather than via reflection at runtime. - Fixed
equalsandhashCodeforSized. - Added
Repeattype class for repeatedly concatenating an HList someNatnumber of times. - Added syntax for injection into coproducts,
true.inject[String :+: Boolean :+: CNil] // Inr(Inl(true)) - Added
RuntimeInjecttype class for injection into a coproduct viaTypeable,Coproduct.runtimeInject[Int :+: String :+: CNil]("foo": Any) // Inr(Inl("foo")) - Added
AlignByKeystype class allowing records to be aligned by their key types only. - Aligned the semantics of
Witnessmore closely with SIP-23’sValueOf. - Removed faulty implementation of coproduct
ZipOne. - Added support in
Genericfor case-like classes with mutable fields. - Added support for Scala 2.13.0-M2.
- Added support for Scala Native.
- Bumped SBT to 0.13.16.
Source and binary compatibility
shapless 2.3.3 is source and binary compatible with 2.3.0, 2.3.1 and 2.3.2.
Contributors
Contributors for shapeless 2.3.3 are,
- Alex Zorab alec.zorab@gmail.com @aleczorab
- Alexandre Archambault alexandre.archambault@gmail.com @alxarchambault
- Allison H. allisonhb@gmx.com
- Andreas Koestler andreas.koestler@gmail.com @AndreasKostler
- Aristotelis Dossas teldosas@gmail.com @teldosas
- Arya Irani arya.irani@gmail.com @aryairani
- Dale Wijnand dale.wijnand@gmail.com @dwijnand
- Daniel Urban urban.dani@gmail.com
- Fabio Labella fabio.labella2@gmail.com @SystemFw
- Georgi Krastev joro.kr.21@gmail.com @Joro_Kr
- Hamish Dickenson hamish.dickson@gmail.com @hamishdickson
- Harrison Houghton hhoughton@learningobjects.com
- Hywel Andrews hywel.andrews@agoda.com
- Ievgen Garkusha ievgen@riskident.com
- Jacob Barber jacoby6000@gmail.com @jacoby6000
- Jean-Baptiste Giraudeau jb@giraudeau.info @jb9i
- Jeff Martin jmartin@homeaway.com
- Jeremy R. Smith jeremyrsmith@gmail.com @jeremyrsmith
- Juan José Vázquez Delgado juanjo.vazquez.delgado@tecsisa.com @juanjovazquez
- Kenji Yoshida 6b656e6a69@gmail.com @xuwei_k
- Lukasz Golebiewski lukasz.golebiewski@gmail.com @LukaszGobiewsk1
- Michael Zuber michaelg.zuber@gmail.com @mgzuber91
- Mike Limansky mike.limansky@gmail.com @mike_limansky
- Miles Sabin miles@milessabin.com @milessabin
- n4to4 n4to4k@gmail.com @n4to4
- Ronan Michaux ronan_michaux@yahoo.com @ronan_michaux
- Ryadh Khsib ryadh.khsib@gmail.com
- Sarah Gerweck sarah.a180@gmail.com @SGerweck
- Stanislav Savulchik s.savulchik@gmail.com @savulchik
- Tin Pavlinic tin.pavlinic@gmail.com @triggerNZ
- Travis Brown travisrobertbrown@gmail.com @travisbrown
- Valy Diarrassouba v.diarrassouba@gmail.com
- William Harvey harveywi@cse.ohio-state.edu
- Yang Bo (杨博) pop.atry@gmail.com @Atry
- Zainab Ali zainab.ali.london@gmail.com @zainabali
Many thanks to all of you and everyone else who has contributed ideas, enthusiasm and encouragement.