Releases: AVSystem/scala-commons
Releases · AVSystem/scala-commons
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
GenCodec
creates aList
instead ofVector
when deserializingscala.collection.Seq
orscala.collection.immutable.Seq
#76commons-annotations
module removed, annotations moved tocommons-core
- removed
commons-rest
,commons-akka
andcommons-kafka
AnnotationAggregate
redesigned to useaggregated
method rather than dummy type member- aliases for
Annotation
andStaticAnnotation
inCommonAliases
Async
moved fromRawRest
intoconcurrent
packagedeclareSize
,sizePolicy
forOutput
s andknownSize
forInput
s
v1.34.0
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
fromOutput
andSimpleInput
fromInput
- this primarily makes writing wrappers easier. For wrapping, convenience abstract classes have been implemented. isNull
removed fromInput
. Instead,readNull()
returnsBoolean
to indicate whether there wasnull
or not.- Introduced
readCustom
andwriteCustom
as a more principled wayInput
andOutput
implementations may support custom native values likeObjectId
. - Introduced
InputMetadata
which may be used byInput
andOutput
implementations to provide additional information to codecs, e.g.JsonType
byJsonStringInput
. - Introduced
GenObjectCodec
as a public sub-typeclass ofGenCodec
. It hasmaterialize
,HasGenObjectCodec
etc.
Changes in RedisDriver
(breaking)
- Full support for Redis 5, including streams
- Blocking commands can now be executed on
RedisNodeClient
andRedisClusterClient
thanks to a separate connection pool maintained byRedisNodeClient
for them - Simplified type parameterization of Redis API variants by introducing
RedisSerialization
HashKey
type member is renamed toField
- Redis APIs are now parameterized also by
Record
type which has a separateRedisRecordCodec
serialization typeclass which can be derived fromGenObjectCodec
. Records are used in Redis hash and stream commands. RedisDataCodec
no 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.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
- REST framework: header parameter names are case insensitive when reading from
RestRequest
- allowed
val
s andvar
s 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
MacroInstances
no longer requires methods inInstances
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
- usage of
MacroCommons
fromcommons-macros
no longer requirescommons-annotations
orcommons-core
in classpath of macro callsites (breaking for client classes extendingMacroCommons
) - 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-independentMacroInstances
(breaking) - added missing
example
field into OpenAPISchema
in REST framework (breaking) - improved/fixed annotation processing by properly substituting type parameters of annotations
- dropped
RpcImplicitsProvider
, instead one should rely on implicit injection throughMacroInstances
into companion objects (breaking) GenCodecMacros
now use the same implicit resolution & caching engine as RPC/ADT metadata macrosRestStructure
refactored/simplified (breaking)
v1.32.0
Changes in RPC/ADT macro engines:
@reifyEncodedAnnot
removed, allowed@composite
parameters to be@optional
instead- introduced
@reifyDefaultValue
for reifying Scala-level default values of case class fields - introduced
overloadedOnly
flag for@rpcNamePrefix
which causes it to be used only for overloads of RPC methods - introduced
ImplicitNotFound
typeclass for customizing implicit-not-found compilation errors for arbitrary types
REST framework:
- support for headers in HTTP responses (requires custom serialization to
RestResponse
) - automatic handling of
HEAD
andOPTIONS
requests operationId
in generatedOperation
objects now defaults to RPC methods plain name, without the HTTP method prefix (e.g.soSomething
instead ofpost_doSomething
) unless the method is overloaded.- nicer compilation error messages for various missing REST-related implicits
@operationIdPrefix
annotation for prefix methods- operation adjusters can now be specified for prefix methods - will apply to all operations under a prefix method
- introduced new type of adjuster:
PathItemAdjuster
for adjusting OpenAPIPathItem
objects - introduced new adjuster annotations:
@operationId
,@nullable
,@tags
,@bodyDescription
,@responseDescription
,@pathDescription
,@summary
,@pathSummary
,@title
,@schemaDescription
- configurable async context timeout and buffer size for Jetty-based client & server
- OpenAPI generation now accepts predefined Components
- various minor fixes and improvements
GenCodec
:
- compilation errors raised for missing dependencies are positioned on case class parameters which cause these errors
GenCodec.Auto
removed
v1.31.0
Changes in REST framework:
- support for
application/x-www-form-urlencoded
through@FormBody
annotation on REST methods OpenApi
now supports arbitrary JSON values for default values in schemas, enums and examples- Default values from
@whenAbsent
annotation on method parameters and case class parameters are included into generated OpenAPI documents @example
annotation for REST parameters to define example values later included into OpenAPI document
Other changes:
MacroGenerated
now accepts typed companion which may inject implicits into macro materializationApplier
andUnapplier
typeclasses- annotations materialized using
@reifyAnnot
and@reifyEncodedAnnot
can accept parameters annotated as@infer
which will be inferred by macro engine as implicits