diff --git a/Docs/actorables.adoc b/Docs/actorables.adoc index 2804f74fe..337d3ea04 100644 --- a/Docs/actorables.adoc +++ b/Docs/actorables.adoc @@ -286,8 +286,8 @@ The project will be checked out and available in `.build/checkouts/swift-distrib swift run --package-path .build/checkouts/swift-distributed-actors GenActors ---- -The GenActors command by default inspects the `Sources` directory for files which end with `+Actorable.swift`, -and applies source generation on them. Optionally, you may pass folder paths or file names. +The GenActors command by default inspects the `Sources` directory for files and detects top level types conforming to the +api:Actorable[protocol] protocol. Optionally, you may pass folder paths or file names explicitly. === Actorables and Serialization diff --git a/Tests/DistributedActorsDocumentationTests/Actorable/ActorableDocExamples.swift b/Tests/DistributedActorsDocumentationTests/Actorable/ActorableDocExamples.swift index 990fceb3b..ae9b9e81f 100644 --- a/Tests/DistributedActorsDocumentationTests/Actorable/ActorableDocExamples.swift +++ b/Tests/DistributedActorsDocumentationTests/Actorable/ActorableDocExamples.swift @@ -60,11 +60,10 @@ struct ContextGreeter: Actorable { // tag::self_myself_call[] public struct InvokeFuncs: Actorable { - let context: Myself.Context - + public func doThingsAndRunTask() -> Int { - context.log.info("Doing things...") + self.context.log.info("Doing things...") // invoke the internal task directly, synchronously let result: Int = self.internalTask() // <1> @@ -74,7 +73,7 @@ public struct InvokeFuncs: Actorable { public func doThingsAsync() -> Reply { // <2> // send myself a message to handle internalTask() in the future - let reply: Reply = context.myself.internalTask() // <3> + let reply: Reply = self.context.myself.internalTask() // <3> return reply }