Releases: AVSystem/scala-commons
Releases · AVSystem/scala-commons
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)
v1.32.0
Changes in RPC/ADT macro engines:
@reifyEncodedAnnotremoved, allowed@compositeparameters to be@optionalinstead- introduced
@reifyDefaultValuefor reifying Scala-level default values of case class fields - introduced
overloadedOnlyflag for@rpcNamePrefixwhich causes it to be used only for overloads of RPC methods - introduced
ImplicitNotFoundtypeclass 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
HEADandOPTIONSrequests operationIdin generatedOperationobjects now defaults to RPC methods plain name, without the HTTP method prefix (e.g.soSomethinginstead ofpost_doSomething) unless the method is overloaded.- nicer compilation error messages for various missing REST-related implicits
@operationIdPrefixannotation 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:
PathItemAdjusterfor adjusting OpenAPIPathItemobjects - 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.Autoremoved