Commit Graph

223 Commits

Author SHA1 Message Date
Konrad `ktoso` Malawski
49ae51c37c small cleanups 2022-08-18 18:07:28 +09:00
Konrad `ktoso` Malawski
968a64eb8b Apply suggestions from code review
Co-authored-by: Yim Lee <yim_lee@apple.com>
2022-08-18 17:04:11 +09:00
Konrad `ktoso` Malawski
1f840d75cc actor system docs 2022-08-17 22:07:41 +09:00
Konrad `ktoso` Malawski
25e17930cc [Distributed] more specific errorCodes for dist failures; hide the make error func 2022-08-10 10:39:12 +09:00
Konrad `ktoso` Malawski
2418aeb375 [Distributed] documentation 2022-07-29 12:32:49 +09:00
Konrad `ktoso` Malawski
96462980fe improve error reporting 2022-07-29 10:44:38 +09:00
Konrad `ktoso` Malawski
cf37dd8860 make error func can be internal 2022-07-29 09:51:53 +09:00
Konrad `ktoso` Malawski
fbc829fbbd [Distributed] Don't hang, but throw when target accessor not found 2022-07-29 09:33:38 +09:00
Konrad `ktoso` Malawski
febfef97d4 [Distributed] Skeleton implementation of distributed computed properties 2022-06-29 14:49:04 -07:00
Konrad `ktoso` Malawski
6a2778645f Revert "Merge pull request #59481 from xedin/distributed-computed-properties"
This reverts commit 8125a85a8f, reversing
changes made to 728971c5b7.
2022-06-25 08:49:00 +09:00
Konrad `ktoso` Malawski
5a5b7c007c towards distributed getters 2022-06-17 12:12:16 -07:00
Max Desiatov
1ef2eeffa4 Fix typo in DistributedActorSystem.swift doc comment
`an distributed actor` -> `a distributed actor`
2022-05-29 19:21:43 +01:00
Konrad `ktoso` Malawski
1675669e43 Revert "[Distributed] workaround for LocalTestingDAS crashes;"
This reverts commit bcd0f64e91.
2022-05-08 19:37:24 +09:00
Konrad `ktoso` Malawski
1e489d6c0b [Distributed] Force the order of properties in AST 2022-05-08 18:20:50 +09:00
Konrad `ktoso` Malawski
bcd0f64e91 [Distributed] workaround for LocalTestingDAS crashes;
This happens to work, but is not a real fix; we are not handling well
types declared in a library evolution enabled library, which this DAS
is. Without this, at runtime, we crash in LocalTestingDAS using actor
initializers
2022-05-07 07:28:55 +09:00
Josh Soref
7a57e7ce99 Spelling stdlib/public/concurrency (#42443)
* spelling: already

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: appropriate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: asynchronous

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cancel

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: divisible

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: execution

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initialized

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: normally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: preprocessed

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: priority

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: some

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: success

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: suspending

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: the

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: throws

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-21 11:12:57 -07:00
Josh Soref
644c18ca9b Spelling stdlib (#42444)
* spelling: against

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: algorithmic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: alignment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: anything

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: architectural

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: architecture

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: are

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: artificial

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aside

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: being

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bidirectional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: characters

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: circular

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: compatibility

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: compiled

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: correctly

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: covers

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: declaration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependencies

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: descriptor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dictionaries

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dynamic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: greater

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: hierarchy

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: immortal

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initialize

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initializes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: iterable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: message

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: minimum

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: originally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: simplified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: sophisticated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trivia

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: wasn't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-19 14:02:43 -07:00
Konrad `ktoso` Malawski
79ad9278b2 [Distributed] Retain adhoc decodeNextArgument in distributed thunk 2022-04-18 16:53:10 -07:00
Konrad `ktoso` Malawski
edd5880a59 [Distributed] SerializationReq must be associated type on DA 2022-04-13 21:52:15 +09:00
Allan Shortlidge
f0360a2984 Fix trivial warnings emitted during a full build. 2022-04-05 17:16:19 -07:00
Konrad `ktoso` Malawski
8d3e7d91c0 [Distributed] ResultHandler.onReturn must be ad-hoc because SerializationRequirement (#41916)
* [Distributed] Invoke handler.onReturn ad hoc via ast synthesized func

* reformat and cleanup

* remove unused var
2022-03-24 21:44:37 +09:00
Konrad `ktoso` Malawski
5a5d1ba2e6 [Distributed] Implement RemoteCallArgument 2022-03-17 22:55:09 +09:00
Konrad `ktoso` Malawski
20f28f8c3c [Distributed] make RemoteCallTarget Hashable, add availability 2022-03-17 20:05:31 +09:00
Konrad `ktoso` Malawski
ea29723466 [Distributed] Add name parameter to recordArgument for better interop 2022-03-17 20:05:31 +09:00
swift-ci
fcde683a32 Merge pull request #41756 from yim-lee/distributed/loccal-actor-system
[Distributed] Offer LocalTestingDistributedActorSystem
2022-03-15 23:47:41 -07:00
Konrad `ktoso` Malawski
8a1c513993 add test and availability annotations 2022-03-15 16:42:58 -07:00
Konrad `ktoso` Malawski
4f8c0152c3 update some missing places with _ 2022-03-16 08:35:37 +09:00
Konrad `ktoso` Malawski
8c13370242 [Distributed] rename _Distributed to underscoreless module 2022-03-16 08:35:35 +09:00
Yim Lee
b001d5bc59 swift-syntax-test bug fixed; remove workaround 2022-03-15 12:34:28 -07:00
Yim Lee
143914a4e7 Use os_unfair_lock on Apple platforms 2022-03-15 12:34:28 -07:00
Yim Lee
2adcd724cb Make thread safe 2022-03-15 12:34:28 -07:00
Yim Lee
a5adf2640b Workaround swift-syntax-test bug 2022-03-15 12:34:28 -07:00
Yim Lee
c5254bb427 Add @available 2022-03-15 12:34:28 -07:00
Yim Lee
2e5d4b64e6 Fix build errors 2022-03-15 12:34:28 -07:00
Yim Lee
1dd0604cf5 Don't print 2022-03-15 12:34:28 -07:00
Yim Lee
290506d006 Add LocalTestingActorAddress 2022-03-15 12:34:28 -07:00
Yim Lee
97da20585e Fix build errors 2022-03-15 12:34:28 -07:00
Yim Lee
bb9014017a Offer LocalTestingDistributedActorSystem
Add local-only actor system `LocalTestingDistributedActorSystem` to make code and tutorial development easier.

rdar://89580224
2022-03-15 12:34:28 -07:00
Konrad `ktoso` Malawski
6caeecdc58 fix locating constructor 2022-03-15 23:50:28 +09:00
Konrad `ktoso` Malawski
7718448636 [Distributed] Simplify repr of RemoteCallTarget 2022-03-15 18:03:13 +09:00
Konrad `ktoso` Malawski
4fa0855907 [Distributed] RemoteCallTarget now pretty prints and hides mangled names 2022-03-15 17:34:04 +09:00
Konrad `ktoso` Malawski
8925f9d8fb [Distributed] recordErrorType is not ad-hoc requirement anymore 2022-03-15 17:13:42 +09:00
Konrad `ktoso` Malawski
13cc8b3157 [Distributed] Enable no-longer-experimental distributed by default 2022-03-11 22:14:49 +09:00
Konrad `ktoso` Malawski
6d502fc042 [Distributed] Implicit Codable conformance for Dist Actors
[Witness] implement dump() on witness
2022-03-11 18:07:14 +09:00
Konrad `ktoso` Malawski
5ab8e0834d [Distributed] Reimplement distributed call thunks completely in AST (#41616)
* [Distributed] dist actor always has default executor (currently)

* [Distributed] extra test for missing makeEncoder

* [DistributedDecl] Add DistributedActorSystem to known SDK types

* [DistributedActor] ok progress on getting the system via witness

* [Distributed] allow hop-to `let any: any X` where X is DistActor

* [Distributed] AST: Add an accessor to determine whether type is distributed actor

- Classes have specialized method on their declarations
- Archetypes and existentials check their conformances for
  presence of `DistributedActor` protocol.

* [Distributed] AST: Account for distributed members declared in class extensions

`getConcreteReplacementForProtocolActorSystemType` should use `getSelfClassDecl`
otherwise it wouldn't be able to find actor if the member is declared in an extension.

* [Distributed] fix ad-hoc requirement checks for 'mutating'

[PreChecker] LookupDC might be null, so account for that

* [Distributed] Completed AST synthesis for dist thunk

* [Distributed][ASTDumper] print pretty distributed in right color in AST dumps

* wip on making the local/remote calls

* using the _local to mark the localCall as known local

* [Distributed] fix passing Never when not throwing

* fix lifetime of mangled string

* [Distributed] Implement recordGenericSubstitution

* [Distributed] Dont add .

* [Distributed] dont emit thunk when func broken

* [Distributed] fix tests; cleanups

* [Distributed] cleanup, move is... funcs to DistributedDecl

* [Distributed] Remove SILGen for distributed thunks, it is in Sema now!

* [Distributed]  no need to check stored props in protocols

* remote not used flag

* fix mangling test

* [Distributed] Synthesis: Don't re-use AST nodes for `decodeArgument` references

* [Distributed] Synthesis: Make sure that each thunk parameter has an internal name

* [Distributed/Synthesis] NFC: Add a comment regarding empty internal parameter names

* [Distributed] NFC: Adjust distributed thunk manglings in the accessor section test-cases

* cleanup

* [Distributed] NFC: Adjust distributed thunk manglings in the accessor thunk test-cases

* review follow ups

* xfail some linux tests for now so we can land the AST thunk

* Update distributed_actor_remote_functions.swift

Co-authored-by: Pavel Yaskevich <xedin@apache.org>
2022-03-10 23:58:23 +09:00
Konrad `ktoso` Malawski
040a4a318c [Concurrency][Distributed] Move AnyActor to Concurrency module 2022-03-08 15:28:30 +09:00
Konrad `ktoso` Malawski
94c0e522b0 Merge pull request #41415 from xedin/dist-generic-accessors
[Distributed] Remove class-bound restriction from target invocation decoder
2022-02-17 23:10:10 +09:00
Konrad `ktoso` Malawski
7c145cc55b Merge pull request #41179 from ktoso/wip-improved-adhoc-checks
[Distributed] improve ad-hoc requirement typechecking
2022-02-17 09:16:42 +09:00
Pavel Yaskevich
9bf03b6c8e [Distributed] Teach runtime that _executeDistributedTarget and accessors are generic over decoder type 2022-02-16 11:16:12 -08:00
Pavel Yaskevich
d95a31e15a [Distributed] Drop class requirement from DistributedTargetInvocationDecoder
This allows us to avoid heap allocation and reference counting
when working with decoders. Also both (public and internal)
distributed target execution methods has been made generic over
a decoder type.
2022-02-16 11:11:39 -08:00