Commit Graph

493 Commits

Author SHA1 Message Date
Konrad `ktoso` Malawski
ef525424f6 Merge pull request #59700 from xedin/distributed-computed-properties-via-accessor-thunk
[Distributed] Implement distributed computed properties via special accessor
2022-06-30 16:04:36 +09:00
Pavel Yaskevich
3006e92d56 [Distributed] NFC: XFAIL a couple of incorrect attr use tests 2022-06-29 14:49:10 -07:00
Pavel Yaskevich
84fa2322d3 [Distributed] Synthesize 'distributed thunk' accessor for distributed computed properties 2022-06-29 14:49:10 -07:00
Konrad `ktoso` Malawski
febfef97d4 [Distributed] Skeleton implementation of distributed computed properties 2022-06-29 14:49:04 -07:00
Kavon Farvardin
41134ea8a0 Remove the need for convenience on actor inits to delegate.
This is possible because actors do not support inheritance. There
is one specific exception to that rule, which is that an actor
can inherit from `NSObject` just to support ObjC interop.

This means an actor is effectively a final class.

resolves rdar://87568153
2022-06-27 16:01:08 -07:00
Konrad `ktoso` Malawski
fa077c1390 [Distributed] distributed func checks now work in protocols & dont crash 2022-06-27 17:17:45 +09:00
Konrad `ktoso` Malawski
22b20afce6 [Distributed] make witness be the distributed thunk 2022-06-27 17:08:55 +09: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
bfb69d7ef0 [Distributed] Unlock test which was ASAN failures in the past (2)
This was very very likely solved by our ID/ActorSystem property ordering, this would have indeed triggered ASAN.

Resolves rdar://92277271
2022-06-23 10:18:10 +09:00
Konrad `ktoso` Malawski
5b899e5fac Merge pull request #59627 from apple/wip-asan-ok
[Distributed] Unlock test which was ASAN failures in the past
2022-06-23 10:17:03 +09:00
Konrad `ktoso` Malawski
1c58ee654d [Distributed] Unlock test which was ASAN failures in the past 2022-06-22 09:30:59 +09:00
Konrad `ktoso` Malawski
53168355f0 [Distributed] Explicitly ban a class extending AnyActor as well 2022-06-22 09:21:55 +09:00
Pavel Yaskevich
fa2e64c1fd [Distributed] Sema: Add a new distributed-thunk attribute
The attribute comes handy during solution application to
determine whether the call is using a distributed thunk.
2022-06-17 12:35:54 -07:00
Konrad `ktoso` Malawski
0caf03d63f [Distributed] adjust test to pass with less accurate diagnostics; while we work on getting them back 2022-06-17 12:35:54 -07:00
Pavel Yaskevich
cae01486c6 [CSApply] Distributed: Inject distributed thunk when necessary
Replace distributed member references with distributed thunks
when access happens outside of distributed actor context. This
significantly simplifies distributed compute properties implementation.
2022-06-17 12:35:48 -07:00
Konrad `ktoso` Malawski
5a5b7c007c towards distributed getters 2022-06-17 12:12:16 -07:00
Konrad `ktoso` Malawski
079bbcf517 wip 2022-06-17 12:12:16 -07:00
Doug Gregor
774a94f69d Make sure we can dig out the (distributed) actor from an archetype.
Fixes #59356 / rdar://94976378.
2022-06-14 10:57:29 -07:00
Konrad `ktoso` Malawski
8e6d72190c [Distributed] Further witness checking cleanup and tests 2022-06-14 14:12:39 +09:00
Konrad `ktoso` Malawski
911b42f597 workaround for #59356 while still implementing the witness feature 2022-06-10 21:17:37 +09:00
Konrad `ktoso` Malawski
bd052eedd7 improve FIXME to link to issue 2022-06-10 13:41:37 +09:00
Konrad `ktoso` Malawski
7792a3127b [Distributed] Implement missing case in permitting witnesses 2022-06-10 12:46:33 +09:00
Konrad `ktoso` Malawski
402501da93 [Distributed] Also prevent mutating remoteCall impls 2022-05-31 15:09:50 +09:00
Konrad `ktoso` Malawski
2b0b38968a [Distributed] onReturn ad-hoc req must not be mutating 2022-05-31 11:53:10 +09:00
Doug Gregor
6390fcb1c9 Merge pull request #59086 from DougGregor/se-0338-sendable 2022-05-25 19:30:20 -07:00
Ben Barham
efc9469444 Merge pull request #58975 from bnbarham/make-features-consistent
[Tests] Make OS features consistent
2022-05-25 16:02:43 -07:00
Doug Gregor
a8e16297a9 Sendable checking for overrides.
When an override means crossing an actor boundary, check Sendability of
parameters and results.
2022-05-25 15:17:47 -07:00
Luciano Almeida
d95cd97703 [Sema] Improving implicit closure capture diagnostic wording 2022-05-24 20:49:45 -03:00
Ben Barham
c163e0fe5e [Tests] Make OS features consistent
lit.py currently allows any substring of `target_triple` to be used as a
feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of
the OS spread across the tests and is also somewhat confusing since they
aren't actually listed in the available features.

Modify all OS-related features to use the `OS=` version that Swift adds
instead. We can later remove `config.target_triple` so that these don't
the non-OS versions don't work in the first place.
2022-05-20 19:51:23 -07:00
Karoy Lorentey
ba525375c6 [wrangler] Unconditionally disable test/Distributed/Runtime/distributed_actor_init_local for now 2022-05-18 17:58:45 -07:00
Konrad `ktoso` Malawski
bec6a94c61 [Distributed] disable local_init test for 32bit platforms 2022-05-12 08:01:22 +09:00
Konrad `ktoso` Malawski
2a89cea262 [Distributed] restore id synthesis in DerivedConformance infra for multi module cases 2022-05-09 18:34:08 +09: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
Evan Wilde
a7558d34e5 Disabling failing test distributed_actor_init_local 2022-05-07 11:32:45 -07: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
Konrad `ktoso` Malawski
90e034f1dc [Distributed] Diagnose missing inout on remoteCall decls 2022-05-05 07:09:03 +09:00
Josh Soref
a806726948 spelling: thesystem
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-30 23:37:02 -04:00
Josh Soref
75fd05675c spelling: exploded
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-30 23:37:02 -04:00
Artem Chikin
3589d06b7d Disable failing distributed actor tests. Example failure: https://ci.swift.org/job/oss-swift-incremental-ASAN-RA-macos//408/console. Resolves rdar://92277271 2022-04-25 16:58:14 -07:00
Konrad `ktoso` Malawski
dfc2294e42 [Distributed] unlock test which used to fail on 32bit watch 2022-04-25 16:31:22 +09:00
Doug Gregor
8c3d1fb2ca Make sure we don't provide duplicate synthesized conformance table entries.
This was benign with `Sendable`, but is not benign for the `Encodable`
and `Decodable` synthesis for distributed actors, which results in a
crash in TBD generation.

Fixes rdar://92008955.
2022-04-22 15:41:01 -07:00
Doug Gregor
c9dcca4f5e Merge pull request #42577 from ktoso/wip-prevent-multiple-id-synthesis
[Distributed] Guard ID synthesis from happening multiple times
2022-04-22 15:25:33 -07:00
Konrad `ktoso` Malawski
5ffdf0ba44 Merge pull request #42567 from DougGregor/distributed-actor-stored-property-layout
Layout distributed actor id and actorSystem fields first in stored properties
2022-04-22 23:43:31 +09:00
Konrad `ktoso` Malawski
317fdd0740 [Distributed] Guard ID synthesis from synthesizing the property multiple times; e.g. during multi module builds 2022-04-22 23:18:16 +09:00
Doug Gregor
0994918f58 Layout distributed actor id and actorSystem fields first in stored properties
The stored properties `id` and `actorSystem` that are synthesized for
a distributed actor would end up getting placed in fairly random
locations within the stored properties lists based on when they were
synthesized. This means that they (1) weren't always in the prefix, and
(2) weren't always the same order in every translation unit. Hilarity ensues.

Fixes rdar://92142457.
2022-04-21 23:07:16 -07:00
Doug Gregor
4116d7a3d7 Rename the -strict-concurrency= options to be more descriptive.
The three options are now:

* `explicit`: Enforce Sendable constraints where it has been explicitly adopted and perform actor-isolation checking wherever code has adopted concurrency. (This is the default)
* `targeted`: Enforce Sendable constraints and perform actor-isolation checking wherever code has adopted concurrency, including code that has explicitly adopted Sendable.
* `complete`: Enforce Sendable constraints and actor-isolation checking throughout the entire module.
2022-04-20 18:17:33 -07:00
Doug Gregor
f404b58b96 Add -strict-concurrency=limited to tests that specifically need it.
This isolates us from changes in the default.
2022-04-20 09:11:10 -07:00
Pavel Yaskevich
fc662bc8e1 [Distributed] NFC: Adjust accessor tests to check for direct call to decodeNextArgument 2022-04-18 17:27:31 -07:00
Konrad `ktoso` Malawski
560e96fcbe [Distributed] Temporarily simplify SIL tests; avoid a few checks 2022-04-18 16:53:47 -07:00