Skip to content

[DNM][Serialization] Preserve indirect conformances knowledge with safety #65084

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

Closed
wants to merge 5 commits into from

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Apr 11, 2023

No description provided.

@xymus xymus marked this pull request as draft April 11, 2023 22:53
@xymus
Copy link
Contributor Author

xymus commented Apr 11, 2023

@swift-ci Please smoke test

@xymus
Copy link
Contributor Author

xymus commented Apr 11, 2023

@swift-ci Please Test Source Compatibility

@xymus
Copy link
Contributor Author

xymus commented Apr 12, 2023

@swift-ci Please smoke test macOS

xymus added 5 commits April 14, 2023 13:40
When getTopLevelDeclsForDisplay is called on an imported module, it may
lists non-public decls. If we they try to inject the conformance on
Sendable on internal types, the compiler may crash on failing to
deserialize internal details. As a fix, let's only inject the
conformance on public or package types.

rdar://95430471
Disabling access control is fundamentally incompatible with
deserialization safety. Let's turn off safety automatically when in use.

This was reported by a few tests:

stdlib/Dictionary.swift
stdlib/Set.swift
stdlib/SetOperations.swift.gyb
stdlib/SwiftNativeNSBase.swift
@xymus xymus force-pushed the serial-indirect-conformances branch from ef8630d to 9fe07a4 Compare April 17, 2023 17:23
@xymus
Copy link
Contributor Author

xymus commented Apr 17, 2023

@swift-ci Please Test Source Compatibility

@xymus
Copy link
Contributor Author

xymus commented Apr 17, 2023

@swift-ci Please test

@xymus
Copy link
Contributor Author

xymus commented Apr 18, 2023

The compatibility suite doesn't show any new regression. Closing in favor of a feature PR.

@xymus xymus closed this Apr 18, 2023
@xymus xymus deleted the serial-indirect-conformances branch April 18, 2023 21:11
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.

1 participant