Commit graph

117 commits

Author SHA1 Message Date
Patrik Nordwall
1b3a75b3f8 Remove EventSourcedEntity, #27724
Move utils to construct PersistenceId

* Move from EntityTypeKey to PersistenceId
* Thereby no persistence dependencies in sharding
* Reference documentation PersistenceId and how to use with Sharding
* Add EntityTypeKey to EntityContext to make it "complete"
* One consequence of adding EntityTypeKey to EntityContext is that
  now requires additional message type parameter and then type inference
  for `init` (Entity) breaks down. Solved by using two parameter lists in
  Entity.apply, which is pretty nice anyway since the second parameter is
  a function.
* as bonus the dependency can be removed
2019-09-26 11:59:00 +02:00
Helena Edelson
9a9e21a62b Consolidate Paradox settings, add includes workaround #27656 (#27657) 2019-09-09 14:25:33 +02:00
franciscolopezsancho
dd96d21ffa First step of changing to SL4J in Typed logging, #26537 2019-09-06 10:09:53 +02:00
Helena Edelson
a83c14b9aa
Remove mentions of Typed - replaces @@@note of classic/typed with an includes (#27617) 2019-09-03 13:23:47 -07:00
Christopher Batey
d6289c7e7c Clean up of utilities docs
* Removes sections that describe language features: Futures and Duration
* Keeps section for logging and circuit breaker
* Keep logging as is for now, to be updated with the Typed SL4J logging

Creates issues for
* Documenting typed extensions https://github.com/akka/akka/issues/27448
* Future interactions in https://github.com/akka/akka/issues/27449

Refs #27223

Add redirects from removed pages to 2.5 docs

Make indexes complete and fix link

'Classic' in the title for docs for classic API's
2019-08-23 14:54:20 +02:00
Christopher Batey
6c13949aec Use protobuf3 for internal serialization (#27366)
* Only load akka protobuf serializer if protobuf on the classpath
2019-08-15 17:43:19 +02:00
Arnout Engelen
a7e8ad2918 Update paradox (#27457)
Which adds checks for dead references and pages that are unexpectedly not
in any table of contents
2019-08-06 06:41:53 +02:00
Johan Andrén
03b8c543fc Serialization support for wrapped stream refs (#27353) 2019-07-16 10:11:33 -07:00
Patrik Nordwall
3efc1c2877
Disable Java serialization by default, #22333 (#27285)
* 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
2019-07-11 14:04:24 +02:00
Christopher Batey
139d9a3c0c Remove ApiMayChange from typed testkit (#27096)
* Remove ApiMayChange from typed testkit

* Don't disable mima plugin to highlight times we break bin cmompat

Refs #26897

* Add api may change to test inbox and behavior test kit
2019-07-04 11:03:27 +02:00
Arnout Engelen
af3ee37d6c
Option to target system JDK instead of JDK8 (#27083)
Inspired by the proposal by @nvollmar in 0940dfc
2019-06-17 16:55:54 +02:00
Patrik Nordwall
57fd889548
remove Jackson afterburner, since no visible improvement #24155 (#27064)
* remove Jackson afterburner, since no visible improvement #24155

* add back timeMessage benchmark

* improve custom mapper test
2019-06-13 21:53:21 +02:00
Christopher Batey
6e93bef605
Enable Jackson for 2.13 (#27136)
* Enable jackson for 2.13

* Fix 2.13 warnings in jackson module
2019-06-13 16:17:04 +01:00
Patrik Nordwall
397b8792f9
Merge pull request #27054 from akka/wip-24155-typed-actorref-patriknw
Jackson serializer typed.ActorRef, #24155
2019-06-07 13:23:09 +02:00
Patrik Nordwall
5811f4dcb9 optional instead of provided dependency to akka-actor-typed 2019-06-05 08:32:29 +02:00
Nicolas Vollmar
7075c7ad26 Adding improved warning when jdk8 is not found #26222 (#26789) 2019-06-04 12:19:39 +02:00
Patrik Nordwall
93017d05c7 serializer for akka.actor.typed.ActorRef
* 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
2019-05-30 15:08:48 +02:00
Christopher Batey
3888de23ed Remove ApiMayChange from coordination module (#27026)
Note that it will be fully stable in 2.6.0 so no guarantees for milestones before that.

* remove api may change from sharding lease settings
* mima
* Remove settings from module
2019-05-29 15:41:16 +02:00
Christopher Batey
37f42d3220 Remove API may change from akka typed (#27027)
Note that it will become fully stable in 2.6.0 so this doesn't mean that there will be no more API changes.

* Remove from event sourced behavior
* Remove api may change settings from typed modules
* Dont check mima for typed until 2.6
2019-05-29 15:38:14 +02:00
Christopher Batey
96eed177dc
Make netty and aeron dependencies optional (#27017)
* Make netty and aeron dependencies optional
* Include agrona as a mandatory dependency (used in compression tables)
Refs #25169
2019-05-29 09:50:28 +01:00
Patrik Nordwall
9b46a789ab workaround in release script for missing Jackson dependency for Scala 2.13.0-RC2
* Thought that the `crossScalaVersions -= Dependencies.scala213Version` in
  the akka-serialization-jackson project would work also for the +buildRelease, but
  in dry-run it didn't so building twice with explicit Scala versions instead.
* akka-serialization-jackson is then excluded from the aggregate for 2.13
2019-05-24 11:31:21 +02:00
Patrik Nordwall
6122966fca Jackson serializer as replacement for Java serialization, #24155
* 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
2019-05-24 09:03:45 +02:00
Arnout Engelen
3015f197f1
Typed testing docs: imports and scalatest dependency (#26890) 2019-05-23 14:05:06 +02:00
Patrik Nordwall
a9f4f2dd96
akka.build.version property, #26958 (#26959)
* akka.build.version property, #26958

* and use timestamped snapshot version if "timestamp" is passed in
* to support publishing snapshots with same version for Scala 2.12 and 2.13
  with +publish
* remove stampVersion plugin, since it's no longer needed

* store currentDateTime in system property

* to survive reloads
2019-05-20 11:31:46 +02:00
Arnout Engelen
629383545f
Clean up paradox output (#26759)
Fix some validation problems
2019-05-02 18:23:33 +02:00
Arnout Engelen
282b38e832
Remove akka-contrib (#26769)
* Remove akka-contrib #26183

This module has been deprecated since 2.5 and is removed in 2.6
2019-05-02 12:09:11 +02:00
Arnout Engelen
a8bd5af1fb
Remove akka-agent #26184 2019-04-26 16:55:50 +02:00
Arnout Engelen
96c8ef4257 Remove akka-camel (#26768)
* Remove akka-camel

This module has been deprecated since 2.5.0 and will now be removed in 2.6.

If there is interest it can be moved to a separate community-maintained repo.

* Add note to migration guide

* Remove from allModules as well
2019-04-25 15:55:25 +02:00
Ignasi Marimon-Clos
42d4fc90a7 Setup previousVersions for akka-coordination (#26767)
(cherry picked from commit defbbae19e59a9540700678b1c6e863a46b0f660)
2019-04-24 11:52:29 +02:00
Christopher Batey
0ab7a96ae2
Remove Scala 2.11 for Akka 2.6 (#26760)
* Remove Scala 2.11 for Akka 2.6

* Remove unused import

* Update akka-actor/src/main/scala-2.13/akka/compat/Future.scala

Co-Authored-By: chbatey <christopher.batey@gmail.com>

* Update akka-actor/src/main/scala-2.13/akka/compat/Future.scala

Co-Authored-By: chbatey <christopher.batey@gmail.com>

* Remove last few bits of 2.11
2019-04-19 07:53:27 +01:00
Arnout Engelen
abbbfb5b54
Use sbt-paradox-apidoc plugin (#26660)
Instead of using custom code here. Checked with 'meld' that the result
is the same, except for problems that were already there (filed #26659).
2019-04-03 13:14:27 +02:00
Patrik Nordwall
b5b592c8f9
Remove Scala 2.11 from crossScalaVersions (#26656)
* Remove Scala 2.11 from crossScalaVersions

* because +buildRelease doesn't work with mixed crossScalaVersions
* let's use akka.build.scalaVersion when building for 2.11
* aggregatedProjects adjusted depending on akka.build.scalaVersion is 2.11 or not,
  there excluding/including the -typed modules

* update travis to use akka.build.scalaVersion
2019-04-02 15:16:01 +02:00
Christopher Batey
65ccada280 Lease API + use in cluster singleton and sharding, #26480 (#26629)
* lease api
* Cluster singleton manager with lease
* Refactor OldestData to use option for actor reference
* Sharding with lease
* Docs for singleton and sharding lease + config for sharding lease
* Have ddata shard wait until lease is acquired before getting state
2019-03-28 13:31:56 +01:00
Arnout Engelen
6f66981542
Include 'reproducible builds' sbt plugin (#26546)
This does 2 things:
* publish a 'buildinfo' report along with the project artifacts to describe
the build context and parameters
* post-process the jars to remove 'arbitrary' differences, such as jar file
ordering and timestamps.

This makes it easier to detect and explain when 2 builds of the same source
don't produce a bit-per-bit identical result. This for example can improve
our confidence that our distribution pipeline has not been compromised.
2019-03-18 17:12:21 +01:00
Enno
a181c758c1 Paradox: latest 0.5.3, latest theme 0.16, more https (#26522) 2019-03-14 08:26:15 +01:00
Christopher Batey
2e247001f7 Validate compile in multi-jvm (#26400)
* New validateCompile task for multi jvm to run in travis
2019-03-12 12:43:02 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
Patrik Nordwall
e4d38f92a4 Switch to Scalafmt in build
* AvoidInfix in scalafmt.conf

* align.tokens in scalafmt.conf

* scalafmt in MultiJvm

* sbt-scalafmt 2.0.0-RC5

* scalafmt in all* command alias

* scalafmtAll in CONTRIBUTING.md
2019-03-11 16:56:39 +01:00
Johannes Rudolph
e4f66e40c2
Use only https links to doc.akka.io by now 2019-03-07 17:03:17 +01:00
Johan Andrén
26b0869318
(Prefer) non symbolic typed ask 26306 2019-03-01 15:06:50 +01:00
Johan Andrén
3a6040ff64 More tweaking the build to make it work 2019-03-01 10:31:29 +01:00
Johan Andrén
be7790c7b9 No cross-scala-versions for root 2019-02-25 17:28:26 +01:00
Johan Andrén
a8291f323f Typed only on Scala 2.12
* Typed modules not compiled on 2.11
* Dependent modules also not on 2.11:
  * docs
  * akka-bench-jmh split into a separate one for typed

Still doesn't work because something with sbt
2019-02-21 15:47:09 +01:00
Christopher Batey
baa9c52254
Small tweaks to all command aliases (#26403)
* Small tweaks to all command aliases

* Adds other cluster all commands
* Makes allCluster do all cluster modules

* Update CONTRIBUTING.md

Co-Authored-By: chbatey <christopher.batey@gmail.com>
2019-02-21 14:12:55 +00:00
Helena Edelson
7b5e69ded3 Create one SBT general task to run locally before pushing a PR #26157 (#26388)
* Create one SBT general task to run locally before pushing a PR #26157.

* Allow tab completion with same prefix

* Added allTyped command
2019-02-15 19:44:03 +01:00
Patrik Nordwall
43a46c3f1b Make discovery and dns APIs stable
* remove ApiMayChange
2019-01-28 20:01:19 +01:00
hepin1989
27500001ea Add sbt-java-formatter for java code formatting. 2019-01-12 01:41:54 +08:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
hepin1989
c38a5dcf9c Run scalafix to remove unused imports again. 2018-12-17 21:10:11 +08:00
hepin1989
746d0adb45 Setup different fix alias on different sub projects and add support to ignore dedicated packages when do scalafix.
Because some sub projects does not enable the MultiNode plugin.

Add ignore packages support for scalafix.
2018-12-17 21:10:11 +08:00