Skip to content

Commit 93de7be

Browse files
DePasqualeOrgJaewonHur
authored andcommitted
Fix ContainerResource build failure (apple#1408)
The `ContainerResource` target uses `OrderedDictionary` (added in apple#1360) but doesn't declare a dependency on `swift-collections` in `Package.swift`, and the source files import the `Collections` umbrella module instead of `OrderedCollections`. This causes build failures when `OrderedDictionary` is used in public declarations, since the compiler requires the specific submodule to be imported in that context. - Add `swift-collections` dependency to the `ContainerResource` target in `Package.swift` - Change `import Collections` to `import OrderedCollections` in `ApplicationError.swift` and `ResourceLabels.swift`
1 parent a557ce8 commit 93de7be

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ let package = Package(
350350
.target(
351351
name: "ContainerResource",
352352
dependencies: [
353+
.product(name: "Collections", package: "swift-collections"),
353354
.product(name: "Containerization", package: "containerization"),
354355
"ContainerXPC",
355356
"CAuditToken",

Sources/ContainerResource/Common/ApplicationError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// Protocol for errors with a stable code and structured metadata.
1818
/// This allows the client to present the error as it chooses.
1919

20-
import Collections
20+
import OrderedCollections
2121

2222
public protocol AppError: Error {
2323
var code: AppErrorCode { get }

Sources/ContainerResource/Common/ResourceLabels.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// limitations under the License.
1515
//===----------------------------------------------------------------------===//
1616

17-
import Collections
17+
import OrderedCollections
1818

1919
/// Metadata for a managed resource.
2020
public struct ResourceLabels: Sendable, Equatable {

0 commit comments

Comments
 (0)