Releases: AVSystem/scala-commons
Releases · AVSystem/scala-commons
2.6.0
Changes in BSON serialization (in commons-mongo module):
- BSON serialization uses the smallest possible representation based on actual values:
Longis serialized toBsonInt32if the value is small enoughBigIntis serialized toBsonInt64orBsonInt32if the value is small enoughBigDecimalis serialized toBsonDecimal128where possible (#410)
BsonReaderInputbased onBsonBinaryReadercan now read document fields in any order (#411)peekFieldwas implemented- this doesn't work with
BsonDocumentReaderdue to upstream bug in its implementation
2.5.4
2.5.3
2.5.2
2.5.0
v2.0.0
- Added support for Scala 2.13 and dropped support for Scala 2.11
GenCodeccreates aListinstead ofVectorwhen deserializingscala.collection.Seqorscala.collection.immutable.Seq#76commons-annotationsmodule removed, annotations moved tocommons-core- removed
commons-rest,commons-akkaandcommons-kafka AnnotationAggregateredesigned to useaggregatedmethod rather than dummy type member- aliases for
AnnotationandStaticAnnotationinCommonAliases Asyncmoved fromRawRestintoconcurrentpackagedeclareSize,sizePolicyforOutputs andknownSizeforInputs
v1.34.0
REST framework:
- REST framework has been superseded by
udash-restand deprecated. For backwards compatibility, it has been moved to separate, cross compiled module,commons-rest.
Changes in GenCodec (breaking)
- Extracted
SimpleOutputfromOutputandSimpleInputfromInput- this primarily makes writing wrappers easier. For wrapping, convenience abstract classes have been implemented. isNullremoved fromInput. Instead,readNull()returnsBooleanto indicate whether there wasnullor not.- Introduced
readCustomandwriteCustomas a more principled wayInputandOutputimplementations may support custom native values likeObjectId. - Introduced
InputMetadatawhich may be used byInputandOutputimplementations to provide additional information to codecs, e.g.JsonTypebyJsonStringInput. - Introduced
GenObjectCodecas a public sub-typeclass ofGenCodec. It hasmaterialize,HasGenObjectCodecetc.
Changes in RedisDriver (breaking)
- Full support for Redis 5, including streams
- Blocking commands can now be executed on
RedisNodeClientandRedisClusterClientthanks to a separate connection pool maintained byRedisNodeClientfor them - Simplified type parameterization of Redis API variants by introducing
RedisSerialization HashKeytype member is renamed toField- Redis APIs are now parameterized also by
Recordtype which has a separateRedisRecordCodecserialization typeclass which can be derived fromGenObjectCodec. Records are used in Redis hash and stream commands. RedisDataCodecno longer usesStreamOutput/Input- simple values are serialized as plain strings while complex values are serialized to JSON before being sent to Redis. This is a major breaking change in serialization format used by Redis driver to save Scala types into Redis.RetryStrategyis now more composable- Handling of
TRYAGAINRedis Cluster errors with configurable retry strategy - Changes in
ClusterConfig- primarily new retry strategies
v1.33.2
- REST framework: header parameter names are case insensitive when reading from
RestRequest - allowed
vals andvars in macro instances - metadata classes can now have filters of their own (e.g.
@annotated) - previously it was only possible to specify them on metadata parameters
v1.33.1
MacroInstancesno longer requires methods inInstancestrait to be parameterless- introduced
@allowIncompletemeta-annotation for metadata classes which makes it possible to materialize partial metadata for RPCs and ADTs - various minor convenience methods and implicits
v1.33.0
- usage of
MacroCommonsfromcommons-macrosno longer requirescommons-annotationsorcommons-corein classpath of macro callsites (breaking for client classes extendingMacroCommons) - introduced typeclasses for capturing annotations:
AnnotationOf,AnnotationsOf,OptAnnotationOfand implicits for capturing self-annotations into super constructor arguments:SelfAnnotation,SelfAnnotations,SelfOptAnnotation - simplification/generalization of
RpcMacroInstancesinto RPC-independentMacroInstances(breaking) - added missing
examplefield into OpenAPISchemain REST framework (breaking) - improved/fixed annotation processing by properly substituting type parameters of annotations
- dropped
RpcImplicitsProvider, instead one should rely on implicit injection throughMacroInstancesinto companion objects (breaking) GenCodecMacrosnow use the same implicit resolution & caching engine as RPC/ADT metadata macrosRestStructurerefactored/simplified (breaking)