Releases: AVSystem/scala-commons
Releases · AVSystem/scala-commons
v1.27.0
Breaking changes:
BsonRefis now parameterized by entity type and also wraps an actual getter from entity type to referred type- Automatic
GenCodecforMap[K,V]that uses list-of-key-value-pairs encoding (where noGenKeyCodec[K]is available) has been removed
v1.25.3
New features in commons-spring
ScalaParameterNameDiscoverer- aParameterNameDiscovererimplementation which uses Java 8 reflection to obtain parameter names or falls back to Scala runtime reflection when under older Java or when parameter names are not present in bytecodeScalaDefaultValuesInjector- aBeanFactoryPostProcessorimplementation which injects default values of Scala constructor and factory method arguments into bean definitions if they are lacking.
v1.25.2
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-sharedwithcommons-core. - Removed
BasicJavaInterop, implementedJavaInteropseparately 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 vals in companion object of enum class.
Advantages:
- feature parity with Java enums (although
ValueEnumdoes not extendjava.lang.Enum) - every enum constant has
name(name of thefinal valthat 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
ValueEnumwhich 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
GenCodecs for much less generated code by moving as much code as possible to base classes:ApplyUnapplyCodec,ProductCodec,SealedHierarchyCodecetc. - performance optimizations based on benchmarks in comparison with Circe
RPC framework:
- reduced amount of code generated for macro-materialized instances of
AsRawRPC,AsRealRPC - dropped
RPCTypeClassesin favor of newly introducedRPCFramework#RPCCompanionwhich 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-springhas been moved tocommons-springmodule