Skip to content

[Distributed] Augment distributed accessor to lookup witness tables for decode call #41101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 31, 2022

decodeNextArgument requires (at least) that argument type conform
to a serialization requirement, witness table(s) for all protocol
requirements have to be lookup up by accessor to form correct
decodeNextArgument invocation.

xedin added 3 commits January 30, 2022 19:03
…d serialization requirements

A proper `decodeNextArgument` candidate should cover all of the protocols
listed in `SerializationRequirement` associated with distributed actor it
would be used for.
…code call

`decodeNextArgument` requires (at least) that argument type conform
to a serialization requirement, witness table(s) for all protocol
requirements have to be lookup up by accessor to form correct
`decodeNextArgument` invocation.
It's an ad-hoc requirement that has to be checked by the compiler,
since it requires knowledge about a concrete serialization requirement
type associated with a particular distributed actor system.
@xedin xedin added the distributed Feature → concurrency: distributed actor label Jan 31, 2022
@xedin xedin requested a review from ktoso January 31, 2022 05:27
@xedin
Copy link
Contributor Author

xedin commented Jan 31, 2022

@swift-ci please test

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, thank you! Lgtm

actor, ctx.Id_SerializationRequirement)
->castTo<ExistentialType>()
->getConstraintType()
->getDesugaredType();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, totally would have missed that last two calls

@xedin xedin force-pushed the load-witness-tables-for-decodeNextArgument branch from 99cb041 to 9694597 Compare January 31, 2022 08:39
@xedin
Copy link
Contributor Author

xedin commented Jan 31, 2022

@swift-ci please test

@xedin xedin merged commit 9ea2f96 into swiftlang:main Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants