Skip to content

Releases: AVSystem/scala-commons

2.6.0

11 Mar 10:01

Choose a tag to compare

Changes in BSON serialization (in commons-mongo module):

  • BSON serialization uses the smallest possible representation based on actual values:
    • Long is serialized to BsonInt32 if the value is small enough
    • BigInt is serialized to BsonInt64 or BsonInt32 if the value is small enough
    • BigDecimal is serialized to BsonDecimal128 where possible (#410)
  • BsonReaderInput based on BsonBinaryReader can now read document fields in any order (#411)
    • peekField was implemented
    • this doesn't work with BsonDocumentReader due to upstream bug in its implementation

2.5.4

09 Feb 14:59

Choose a tag to compare

  • fixed numeric overflow in RetryStrategy.exponentially

2.5.3

09 Feb 14:49
9ecda72

Choose a tag to compare

  • BSON inputs for GenCodec: allow interpreting BSON Int32 as Long when reading

2.5.2

16 Dec 11:41
456a54a

Choose a tag to compare

commons-mongo:

  • added support for MongoPolyDataCompanion (Scala 2.13 only)

2.5.0

18 Nov 08:26
b21609f

Choose a tag to compare

  • Reworked TypedMap and added support for it in Mongo API
  • Added FloatWrapperCompanion, DoubleWrapperCompanion and BooleanWrapperCompanion

v2.0.0

25 May 20:38

Choose a tag to compare

  • Added support for Scala 2.13 and dropped support for Scala 2.11
  • GenCodec creates a List instead of Vector when deserializing scala.collection.Seq or scala.collection.immutable.Seq #76
  • commons-annotations module removed, annotations moved to commons-core
  • removed commons-rest, commons-akka and commons-kafka
  • AnnotationAggregate redesigned to use aggregated method rather than dummy type member
  • aliases for Annotation and StaticAnnotation in CommonAliases
  • Async moved from RawRest into concurrent package
  • declareSize, sizePolicy for Outputs and knownSize for Inputs

v1.34.0

06 Nov 15:22

Choose a tag to compare

REST framework:

  • REST framework has been superseded by udash-rest and deprecated. For backwards compatibility, it has been moved to separate, cross compiled module, commons-rest.

Changes in GenCodec (breaking)

  • Extracted SimpleOutput from Output and SimpleInput from Input - this primarily makes writing wrappers easier. For wrapping, convenience abstract classes have been implemented.
  • isNull removed from Input. Instead, readNull() returns Boolean to indicate whether there was null or not.
  • Introduced readCustom and writeCustom as a more principled way Input and Output implementations may support custom native values like ObjectId.
  • Introduced InputMetadata which may be used by Input and Output implementations to provide additional information to codecs, e.g. JsonType by JsonStringInput.
  • Introduced GenObjectCodec as a public sub-typeclass of GenCodec. It has materialize, HasGenObjectCodec etc.

Changes in RedisDriver (breaking)

  • Full support for Redis 5, including streams
  • Blocking commands can now be executed on RedisNodeClient and RedisClusterClient thanks to a separate connection pool maintained by RedisNodeClient for them
  • Simplified type parameterization of Redis API variants by introducing RedisSerialization
  • HashKey type member is renamed to Field
  • Redis APIs are now parameterized also by Record type which has a separate RedisRecordCodec serialization typeclass which can be derived from GenObjectCodec. Records are used in Redis hash and stream commands.
  • RedisDataCodec no longer uses StreamOutput/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.
  • RetryStrategy is now more composable
  • Handling of TRYAGAIN Redis Cluster errors with configurable retry strategy
  • Changes in ClusterConfig - primarily new retry strategies

v1.33.2

22 Oct 13:10

Choose a tag to compare

  • REST framework: header parameter names are case insensitive when reading from RestRequest
  • allowed vals and vars 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

17 Oct 14:35

Choose a tag to compare

  • MacroInstances no longer requires methods in Instances trait to be parameterless
  • introduced @allowIncomplete meta-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

16 Oct 12:46

Choose a tag to compare

  • usage of MacroCommons from commons-macros no longer requires commons-annotations or commons-core in classpath of macro callsites (breaking for client classes extending MacroCommons)
  • introduced typeclasses for capturing annotations: AnnotationOf, AnnotationsOf, OptAnnotationOf and implicits for capturing self-annotations into super constructor arguments: SelfAnnotation, SelfAnnotations, SelfOptAnnotation
  • simplification/generalization of RpcMacroInstances into RPC-independent MacroInstances (breaking)
  • added missing example field into OpenAPI Schema in REST framework (breaking)
  • improved/fixed annotation processing by properly substituting type parameters of annotations
  • dropped RpcImplicitsProvider, instead one should rely on implicit injection through MacroInstances into companion objects (breaking)
  • GenCodecMacros now use the same implicit resolution & caching engine as RPC/ADT metadata macros
  • RestStructure refactored/simplified (breaking)