Commit Graph

6 Commits

Author SHA1 Message Date
Alexis Laferrière
5080898f9b [Serialization] Disable deserialization safety along with access control
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
2023-04-13 13:39:14 -07:00
Alexis Laferrière
8ba60da81f [Serialization] Only write the underlying type of an opaque type if inlinable
Clients of a resilient module using opaque types don't need access to
the underlying type unless it's used in an inlinable context. Plus, the
underlying type can reference internal details which can lead to crashes
when they reference implementation-only dependencies. To clean up this
behavior, let's only serialize the underlying type if used by an
inlinable function.

rdar://105128784
2023-04-07 07:49:45 -07:00
Alexis Laferrière
62a646974f [Serialization] Move deserialization safety behind an env var or flag 2023-02-09 17:29:06 -08:00
Alexis Laferrière
09b06a8cd3 Revert "[Serialization] Enable deserialization safety by default"
This reverts commit af70cc5464.

# Conflicts:
#	test/Serialization/Safety/unsafe-decls.swift
2023-02-09 15:28:42 -08:00
Alexis Laferrière
af70cc5464 [Serialization] Enable deserialization safety by default
rdar://99495048
2023-01-19 10:50:55 -08:00
Alexis Laferrière
2dff001be3 [Serialization] Update deserialization skipping test to reflect the safe behavior 2023-01-18 14:47:13 -08:00