Releases: AVSystem/scala-commons
Releases · AVSystem/scala-commons
v1.25.0
commons-core
full cross project
- Modules
commons-shared
(previously cross compiled to JVM and JS) andcommons-core
(previously JVM only) have been merged into a single cross compiled modulecommons-core
. Therefore you must replace your dependencies tocommons-shared
withcommons-core
. - Removed
BasicJavaInterop
, implementedJavaInterop
separately for JS (without Java 8 stuff which is unavailable in ScalaJS)
v1.24.1
ValueEnum
ValueEnum
is a new way for defining Scala enums, representing enum constants as final val
s in companion object of enum class.
Advantages:
- feature parity with Java enums (although
ValueEnum
does not extendjava.lang.Enum
) - every enum constant has
name
(name of thefinal val
that declares the constant) andordinal
(zero based index of enum constant, consistent with declaration order). - less boilerplate than sealed hierarchy based enums
- it's possible to declare many enum constants in a single line of code
- much less generated classes, which is advantageous primarily for JS size reduction
Disadvantages:
- scalac exhaustive pattern match checking does not understand
ValueEnum
which may result in both lack of correct warnings and incorrect warnings - each enum constant can't have its own API (unless through implicit classes)
v1.24.0
Optimizations for JS size reduction
Serialization framework:
- completely refactored macro-generated
GenCodec
s for much less generated code by moving as much code as possible to base classes:ApplyUnapplyCodec
,ProductCodec
,SealedHierarchyCodec
etc. - performance optimizations based on benchmarks in comparison with Circe
RPC framework:
- reduced amount of code generated for macro-materialized instances of
AsRawRPC
,AsRealRPC
- dropped
RPCTypeClasses
in favor of newly introducedRPCFramework#RPCCompanion
which is designed so that DCE removes unused TC instances
RPC generalization
RPC framework has been generalized to allow other types of remote methods than getters, functions and procedures. Old functionality of RPCFramework
is retained as StandardRPCFramework
, which is now a special case of new, generalized RPCFramework
. RPCMetadata
has also been adjusted to reflect the generalization.
These changes are not backwards compatible.
v1.13.1
hocon-spring
has been moved tocommons-spring
module