Skip to content

[Serialization] Compatibility fixes to deserialization safety and access-level #65161

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
merged 2 commits into from
Apr 14, 2023

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Apr 13, 2023

  • Consider decls with an access-level of package as deserialization safe. As with public decls, package decls are expected to be read by clients.
  • When access-control is disabled, disable deserialization safety automatically by default. Tests that disable access-control expect to have access to unsafe decls.

xymus added 2 commits April 13, 2023 13:39
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 requested review from bnbarham and elsh April 13, 2023 20:45
@xymus
Copy link
Contributor Author

xymus commented Apr 13, 2023

@swift-ci Please smoke test

@xymus xymus merged commit 19830a9 into swiftlang:main Apr 14, 2023
@xymus xymus deleted the deser-safety-misc branch April 14, 2023 20:20
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