Notably, case objects.
It's not entirely clear to me why this started failing on Scala 3,
`AccountExampleSpec` picks `JacksonCborSerializer` both for Scala 2
and Scala 3, but only on 3 seems to require this option.
Starting with https://github.com/FasterXML/jackson-databind/issues/2683
Jackson will no longer use the generic bean serialization when serializing a
`java.time.Instant`, but throw an error (since the bean serialization
doesn't make sense for those types anyway).
Our test relied on the bean serialization to test using custom object
mappers. This PR improves the test to use a 'real' custom mapper instead
of just relying on the bean fallback.
* Remove @switch when it doesn't take effect
* Use ActorRef.noSender
* Minor tweaks to SchedulerSpec
* Disambiguate TypedActor for Scala 3
* Bump ScalaTest to a version compatible with Scala 3
* Bump ScalaCheck
* Disambiguate Event in SupervisorHierarchySpec
* Scala 3 compatible EventBusSpec
* Prevent private unused variables to be erased by Scala 3
* Bump mockito
* Explicit actorRef2Scala import
* restore original .scalafix.conf
* Scala 3 compatible tailrec
* Reminder to re add switch annotation in case
* Move to nowarn instead of silencer
* Bump to Scala 2.12.13
* Cross compatible annotations
* fix docs generation
* adapt the build for Scala 3
* fix errors but bus
* remove more SerialVersion from trait
* scalacheck only from scalatest
* cross-compile akka-actor-tests
* restore cross-compilation
* early initializers workaround
* scalacheck switch
* cross compatible FSM.State class
* cross compatible LARS spec
* Change results to pass LineNumberSpec
* fix stackoverflow in AsyncDnsResolverIntegrationSpec
* FSM.State unapply
* fix Scala 2.13 mima
* SerialVersionRemover compiler plugin
* removed unused nowarns
* Embed akka serialization inside jackson serialization
Allows re-use of existing serializers when embedding the types in
Jackson
* Fix false dead code warning
* Move marker trait and add docs
* Remove module and document adding annotations
* Review feedback
This signature of jackson-databind's `set` is:
public <T extends JsonNode> T set(String fieldName, JsonNode value)
When running the Scala compiler with dead code warnings enabled, this
will cause warnings due to https://github.com/scala/bug/issues/8109 .
Making the generic type explicit avoids that.
* Add scalafix plugin for jdk 9.
* Add command alias sortImports.
* Excludes some sources from SortImports.
* Update SortImports to 0.4.0
* Sort imports with `sortImports` command.
* When we updated to Jackson 2.10 (prior Akka 2.6.0) the new JsonFactoryBuilder
was used. That doesn't preserve the formatParserFeatures and formatGeneratorFeatures
from the base CBORFactory and therefore the format was plain JSON.
* rolling update compatibility
* This adds the ability to make Jackson serializers not output the class
name in the manifest in cases where type information is stored in a more
concise format in the JSON itself.
* documentation about rolling updates
* Ensure programatic bindings are search in Jackson serializer
* change config structure to be able to support other compression
algorithms, such as lz4 in the future
* enable compression for json (as before) but disable it by default
for cbor
Co-Authored-By: Ignasi Marimon-Clos <ignasi@lightbend.com>
* Update Jackson to 2.10.0
* Support configuration for new features introduced in Jackson 2.10
* WRITE_DURATIONS_AS_TIMESTAMPS is the new config used to serialize durations
Previously WRITE_DATES_AS_TIMESTAMPS was used for both date/time and duration, but
in Jackson 2.10 WRITE_DURATIONS_AS_TIMESTAMPS is used for durations, so it needs to
be configured consistently with WRITE_DATES_AS_TIMESTAMPS.
* Support configuration for Jackson MapperFeatures in Jackson Serializer
* Add JsonParser.Feature configuration support
* Add JsonGenerator.Feature configuration support
* Fix formatting issues
* Add examples for each feature configuration
* Test coverage of the override methods
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
* the serializer must treat case objects specially since
the way the class is loaded is different, and Jackson
object mapper shouldn't be involved in fromBinary
* No clear advantage over CBOR
* One less choice for users
* CBOR seems to have a stronger specification and therefore potential
for wider adoption
* Performance of CBOR is equals to Smile
* Smile can be slightly more compact
(I think it does more to reduce repeated field names),
but that might be better to solve with good compression
* Needed in Lagom to be able to have separate object mappers with different
config for exernal and internal usage.
* Can also be good to be able to have different config for json and cbor
serializers, or different for remote messages and persisted events.
* Pass in binding name when creating the serializer if it has a matching
constructor
* Serialization identifiers loaded from config via the binding name instead
of class name, for JacksonSerializer.
* most convenient for users to include it akka-serialization-jackson
and load it when akka-actor-typed is in classpath
* provided dependency to akka-actor-typed
* Copied from Lagom, with the following differences
* Jsonable and CompressedJsonable not included
* pcollection and guava modules not enabled by default
* added scala and afterburner modules
* JSON, CBOR and Smile options (different serializers)
* JMH benchmark
* jackson version 2.9.9
* test polymorphism
* serializer for ActorRef
* Address serializer
* FiniteDuration serializer, same as java.time.Duration
* use blacklist from Jackson databind against gadgets
* disallow binding to open ended types, such as java.io.Serializable
* Configurable ObjectMapper ser/deser features
* testing date formats with WRITE_DATES_AS_TIMESTAMPS on/off
* ActorSystemSetup for ObjectMapper creation
* and possibility to lookup created ObjectMapper via ObjectMapperProvider extension
* createObjectMapper without ActorSystem, needed by Lagom test
* add basic docs
* skip Scala 2.13 for akka-serialization-jackson for now, until the Jackson
Scala module has been released