From 5783b82d72e620f37545924d46bdbfb429f03cbb Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Wed, 19 Oct 2022 19:33:33 -0700 Subject: [PATCH] [PersistentCollections] Fix building with library stability enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building this package with library stability enabled is entirely unsupported, but let’s add a few @frozen attributes to fix such builds anyway. This package is explicitly not ABI stable; the @frozen attribute does not mean a guarantee to leave layout unchanged in future revisions. --- Sources/PersistentCollections/Node/_UnsafePath.swift | 1 + .../PersistentDictionary/PersistentDictionary.swift | 1 + Sources/PersistentCollections/PersistentSet/PersistentSet.swift | 1 + 3 files changed, 3 insertions(+) diff --git a/Sources/PersistentCollections/Node/_UnsafePath.swift b/Sources/PersistentCollections/Node/_UnsafePath.swift index 8800d41b..58170d57 100644 --- a/Sources/PersistentCollections/Node/_UnsafePath.swift +++ b/Sources/PersistentCollections/Node/_UnsafePath.swift @@ -34,6 +34,7 @@ /// in a fixed-size array; this would speed up walking over the tree, but it /// would considerably embiggen the size of the path construct.) @usableFromInline +@frozen internal struct _UnsafePath { @usableFromInline internal var ancestors: _AncestorSlots diff --git a/Sources/PersistentCollections/PersistentDictionary/PersistentDictionary.swift b/Sources/PersistentCollections/PersistentDictionary/PersistentDictionary.swift index e31e4604..d97a9ab0 100644 --- a/Sources/PersistentCollections/PersistentDictionary/PersistentDictionary.swift +++ b/Sources/PersistentCollections/PersistentDictionary/PersistentDictionary.swift @@ -9,6 +9,7 @@ // //===----------------------------------------------------------------------===// +@frozen // Not really -- this package is not at all ABI stable public struct PersistentDictionary { @usableFromInline internal typealias _Node = PersistentCollections._Node diff --git a/Sources/PersistentCollections/PersistentSet/PersistentSet.swift b/Sources/PersistentCollections/PersistentSet/PersistentSet.swift index 98260bb9..e90aab25 100644 --- a/Sources/PersistentCollections/PersistentSet/PersistentSet.swift +++ b/Sources/PersistentCollections/PersistentSet/PersistentSet.swift @@ -9,6 +9,7 @@ // //===----------------------------------------------------------------------===// +@frozen // Not really -- this package is not at all ABI stable public struct PersistentSet { @usableFromInline internal typealias _Node = PersistentCollections._Node