Skip to content

Commit

Permalink
Fix warnings in Xcode 16 by restating inherited conformances to `@unc…
Browse files Browse the repository at this point in the history
…hecked Sendable` (#2477)
  • Loading branch information
jszumski committed Sep 10, 2024
1 parent 7a8279b commit fc8a44f
Show file tree
Hide file tree
Showing 26 changed files with 214 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,10 @@ extension CombinedShapeItem {
name: name)
}
}

// MARK: Sendable

/// `CombinedShapeItem` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension CombinedShapeItem: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/Assets/ImageAsset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,10 @@ extension ImageAsset {
#endif
}
}

// MARK: - ImageAsset + Sendable

/// `ImageAsset` inherits `@unchecked Sendable` from `Asset` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension ImageAsset: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/Assets/PrecompAsset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/9/19.
//

// MARK: - PrecompAsset

final class PrecompAsset: Asset {

// MARK: Lifecycle
Expand Down Expand Up @@ -36,3 +38,10 @@ final class PrecompAsset: Asset {
try container.encode(layers, forKey: .layers)
}
}

// MARK: Sendable

/// `PrecompAsset` inherits `@unchecked Sendable` from `Asset` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension PrecompAsset: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/LayerEffects/DropShadowEffect.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Created by Cal Stephens on 8/14/23.
// Copyright © 2023 Airbnb Inc. All rights reserved.

// MARK: - DropShadowEffect

final class DropShadowEffect: LayerEffect {

// MARK: Lifecycle
Expand Down Expand Up @@ -41,3 +43,10 @@ final class DropShadowEffect: LayerEffect {
}

}

// MARK: Sendable

/// `DropShadowEffect` inherits `@unchecked Sendable` from `LayerEffect` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension DropShadowEffect: @unchecked Sendable { }
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Created by Cal Stephens on 8/14/23.
// Copyright © 2023 Airbnb Inc. All rights reserved.

// MARK: - ColorEffectValue

final class ColorEffectValue: EffectValue {

// MARK: Lifecycle
Expand Down Expand Up @@ -34,3 +36,10 @@ final class ColorEffectValue: EffectValue {
case value = "v"
}
}

// MARK: Sendable

/// `ColorEffectValue` inherits `@unchecked Sendable` from `EffectValue` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension ColorEffectValue: @unchecked Sendable { }
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Created by Cal Stephens on 8/14/23.
// Copyright © 2023 Airbnb Inc. All rights reserved.

// MARK: - Vector1DEffectValue

final class Vector1DEffectValue: EffectValue {

// MARK: Lifecycle
Expand Down Expand Up @@ -34,3 +36,10 @@ final class Vector1DEffectValue: EffectValue {
case value = "v"
}
}

// MARK: Sendable

/// `Vector1DEffectValue` inherits `@unchecked Sendable` from `EffectValue` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Vector1DEffectValue: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/LayerStyles/DropShadowStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Created by Cal Stephens on 8/14/23.
// Copyright © 2023 Airbnb Inc. All rights reserved.

// MARK: - DropShadowStyle

final class DropShadowStyle: LayerStyle {

// MARK: Lifecycle
Expand Down Expand Up @@ -68,3 +70,10 @@ final class DropShadowStyle: LayerStyle {
case distance = "d"
}
}

// MARK: Sendable

/// `DropShadowStyle` inherits `@unchecked Sendable` from `LayerStyle` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension DropShadowStyle: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/Layers/ImageLayerModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - ImageLayerModel

/// A layer that holds an image.
final class ImageLayerModel: LayerModel {

Expand Down Expand Up @@ -38,3 +40,10 @@ final class ImageLayerModel: LayerModel {
case referenceID = "refId"
}
}

// MARK: Sendable

/// `ImageLayerModel` inherits `@unchecked Sendable` from `LayerModel` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension ImageLayerModel: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/Layers/PreCompLayerModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - PreCompLayerModel

/// A layer that holds another animation composition.
final class PreCompLayerModel: LayerModel {

Expand Down Expand Up @@ -63,3 +65,10 @@ final class PreCompLayerModel: LayerModel {
case height = "h"
}
}

// MARK: Sendable

/// `PreCompLayerModel` inherits `@unchecked Sendable` from `LayerModel` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension PreCompLayerModel: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/Layers/ShapeLayerModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - ShapeLayerModel

/// A layer that holds vector shape objects.
final class ShapeLayerModel: LayerModel {

Expand Down Expand Up @@ -39,3 +41,10 @@ final class ShapeLayerModel: LayerModel {
case items = "shapes"
}
}

// MARK: Sendable

/// `ShapeLayerModel` inherits `@unchecked Sendable` from `LayerModel` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension ShapeLayerModel: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/Layers/SolidLayerModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - SolidLayerModel

/// A layer that holds a solid color.
final class SolidLayerModel: LayerModel {

Expand Down Expand Up @@ -52,3 +54,10 @@ final class SolidLayerModel: LayerModel {
case height = "sh"
}
}

// MARK: Sendable

/// `SolidLayerModel` inherits `@unchecked Sendable` from `LayerModel` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension SolidLayerModel: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/Layers/TextLayerModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - TextLayerModel

/// A layer that holds text.
final class TextLayerModel: LayerModel {

Expand Down Expand Up @@ -54,3 +56,10 @@ final class TextLayerModel: LayerModel {
case animators = "a"
}
}

// MARK: Sendable

/// `TextLayerModel` inherits `@unchecked Sendable` from `LayerModel` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension TextLayerModel: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/ShapeItems/Ellipse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@ final class Ellipse: ShapeItem {
case size = "s"
}
}

// MARK: Sendable

/// `Ellipse` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Ellipse: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/ShapeItems/Fill.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@ final class Fill: ShapeItem {
case fillRule = "r"
}
}

// MARK: Sendable

/// `Fill` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Fill: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/ShapeItems/GradientFill.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,10 @@ final class GradientFill: ShapeItem {
case colors = "k"
}
}

// MARK: Sendable

/// `GradientFill` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension GradientFill: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/ShapeItems/GradientStroke.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,10 @@ final class GradientStroke: ShapeItem {
case colors = "k"
}
}

// MARK: Sendable

/// `GradientStroke` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension GradientStroke: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/ShapeItems/Group.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - Group

/// An item that define a a group of shape items
final class Group: ShapeItem {

Expand Down Expand Up @@ -44,3 +46,10 @@ final class Group: ShapeItem {
case items = "it"
}
}

// MARK: Sendable

/// `Group` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Group: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/ShapeItems/Merge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ final class Merge: ShapeItem {
case mode = "mm"
}
}

// MARK: Sendable

/// `Merge` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Merge: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/ShapeItems/Rectangle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - Rectangle

final class Rectangle: ShapeItem {

// MARK: Lifecycle
Expand Down Expand Up @@ -68,3 +70,10 @@ final class Rectangle: ShapeItem {
case cornerRadius = "r"
}
}

// MARK: Sendable

/// `Rectangle` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Rectangle: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/ShapeItems/Repeater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - Repeater

final class Repeater: ShapeItem {

// MARK: Lifecycle
Expand Down Expand Up @@ -170,3 +172,10 @@ final class Repeater: ShapeItem {
case scale = "s"
}
}

// MARK: Sendable

/// `Repeater` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Repeater: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/ShapeItems/RoundedCorners.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,10 @@ final class RoundedCorners: ShapeItem {
case radius = "r"
}
}

// MARK: Sendable

/// `RoundedCorners` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension RoundedCorners: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/ShapeItems/Shape.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - Shape

/// An item that defines an custom shape
final class Shape: ShapeItem {

Expand Down Expand Up @@ -52,3 +54,10 @@ final class Shape: ShapeItem {
case direction = "d"
}
}

// MARK: Sendable

/// `Shape` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Shape: @unchecked Sendable { }
9 changes: 9 additions & 0 deletions Sources/Private/Model/ShapeItems/ShapeTransform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Brandon Withrow on 1/8/19.
//

// MARK: - ShapeTransform

final class ShapeTransform: ShapeItem {

// MARK: Lifecycle
Expand Down Expand Up @@ -191,3 +193,10 @@ final class ShapeTransform: ShapeItem {
case skewAxis = "sa"
}
}

// MARK: Sendable

/// `ShapeTransform` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension ShapeTransform: @unchecked Sendable { }
7 changes: 7 additions & 0 deletions Sources/Private/Model/ShapeItems/Star.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,10 @@ final class Star: ShapeItem {
case starType = "sy"
}
}

// MARK: Sendable

/// `Star` inherits `@unchecked Sendable` from `ShapeItem` and
/// we need to restate that here to avoid a warning in Xcode 16
// swiftlint:disable:next no_unchecked_sendable
extension Star: @unchecked Sendable { }
Loading

0 comments on commit fc8a44f

Please sign in to comment.