Skip to content
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

Add sendable to core library #1221

Merged
merged 5 commits into from
Mar 17, 2022

Conversation

thomasvl
Copy link
Collaborator

@thomasvl thomasvl commented Mar 7, 2022

No description provided.

@thomasvl thomasvl marked this pull request as draft March 7, 2022 16:52
@thomasvl
Copy link
Collaborator Author

thomasvl commented Mar 7, 2022

@zwaldowski -

#1213 added the TODO in more places, but a few of them already have the extension to add @unchecked Sendable, what was the intent in the other cases?

@thomasvl thomasvl force-pushed the add_sendable_to_core_library branch from 77c2213 to 45deba8 Compare March 7, 2022 16:59
@zwaldowski
Copy link
Contributor

Yeah, I suppose the TODO on UnknownStorage is a duplicate; that's easily resolved.

what was the intent in the other cases?

The others are all related to ExtensionFieldValueSet. ExtensionFieldValueSet is a requirement of ExtensibleMessage, so moving towards a world of Sendable instead of @unchecked Sendable, it should be Sendable. That family of types can't participate in the _ProtoSendable trick because ProtobufBytes has an associated type of Data, which can't satisfy an associated type requirement for FieldType.BaseType: _ProtoSendable for the same reasons involving Data elsewhere.

I don't think there's anything to practically be done about those TODOs until Data is Sendable or it's replaced with a non-Foundation ContiguousBytes type that is Sendable.

@thomasvl thomasvl force-pushed the add_sendable_to_core_library branch from 45deba8 to d9ec1bd Compare March 7, 2022 17:47
@thomasvl
Copy link
Collaborator Author

thomasvl commented Mar 7, 2022

Thanks, updated to remove the comment on UnknownStorage, but leaving the rest.

@thomasvl thomasvl marked this pull request as ready for review March 7, 2022 17:47
@thomasvl thomasvl requested a review from tbkka March 7, 2022 17:47
@thomasvl
Copy link
Collaborator Author

thomasvl commented Mar 7, 2022

@zwaldowski & @Lukasa - if you can also look things over, it would be appreciated.

@Lukasa
Copy link
Contributor

Lukasa commented Mar 7, 2022

Seems reasonable to me.

@thomasvl thomasvl force-pushed the add_sendable_to_core_library branch from d9ec1bd to 1403dce Compare March 7, 2022 18:51
@thomasvl thomasvl merged commit eff2a19 into apple:main Mar 17, 2022
@thomasvl thomasvl deleted the add_sendable_to_core_library branch March 17, 2022 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants