From bbf8a0266403a13127fdffd87686d1990b64617d Mon Sep 17 00:00:00 2001 From: Michael Rebello Date: Wed, 27 Mar 2024 21:00:40 -0700 Subject: [PATCH 1/2] Update SwiftProtobuf to v1.26.0 https://github.com/apple/swift-protobuf/releases/tag/1.26.0 --- Connect-Swift-Mocks.podspec | 2 +- Connect-Swift.podspec | 2 +- Examples/ElizaCocoaPodsApp/Podfile.lock | 8 ++++---- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- Examples/buf.gen.yaml | 2 +- Libraries/Connect/buf.gen.yaml | 2 +- Package.resolved | 4 ++-- Package.swift | 2 +- Tests/ConformanceClient/buf.gen.yaml | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Connect-Swift-Mocks.podspec b/Connect-Swift-Mocks.podspec index 879b87a6..3a1e2d1a 100644 --- a/Connect-Swift-Mocks.podspec +++ b/Connect-Swift-Mocks.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |spec| spec.watchos.deployment_target = '6.0' spec.dependency 'Connect-Swift', "#{spec.version.to_s}" - spec.dependency 'SwiftProtobuf', '~> 1.25.2' + spec.dependency 'SwiftProtobuf', '~> 1.26.0' spec.source_files = 'Libraries/ConnectMocks/**/*.swift' diff --git a/Connect-Swift.podspec b/Connect-Swift.podspec index caa1d31f..0b93fb1e 100644 --- a/Connect-Swift.podspec +++ b/Connect-Swift.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |spec| spec.tvos.deployment_target = '13.0' spec.watchos.deployment_target = '6.0' - spec.dependency 'SwiftProtobuf', '~> 1.25.2' + spec.dependency 'SwiftProtobuf', '~> 1.26.0' spec.source_files = 'Libraries/Connect/**/*.swift' diff --git a/Examples/ElizaCocoaPodsApp/Podfile.lock b/Examples/ElizaCocoaPodsApp/Podfile.lock index b1d25f4c..45ae070e 100644 --- a/Examples/ElizaCocoaPodsApp/Podfile.lock +++ b/Examples/ElizaCocoaPodsApp/Podfile.lock @@ -1,7 +1,7 @@ PODS: - Connect-Swift (0.12.0): - - SwiftProtobuf (~> 1.25.2) - - SwiftProtobuf (1.25.2) + - SwiftProtobuf (~> 1.26.0) + - SwiftProtobuf (1.26.0) DEPENDENCIES: - Connect-Swift (from `../..`) @@ -15,8 +15,8 @@ EXTERNAL SOURCES: :path: "../.." SPEC CHECKSUMS: - Connect-Swift: 1de2ef4a548c59ecaeb9120812dfe0d6e07a0d47 - SwiftProtobuf: 407a385e97fd206c4fbe880cc84123989167e0d1 + Connect-Swift: e95a0cf0aa6b368c279e8807f054cbecbaee0e5c + SwiftProtobuf: 5e8349171e7c2f88f5b9e683cb3cb79d1dc780b3 PODFILE CHECKSUM: b598f373a6ab5add976b09c2ac79029bf2200d48 diff --git a/Examples/ElizaSwiftPackageApp/ElizaSwiftPackageApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/ElizaSwiftPackageApp/ElizaSwiftPackageApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 3da309aa..040bd11e 100644 --- a/Examples/ElizaSwiftPackageApp/ElizaSwiftPackageApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Examples/ElizaSwiftPackageApp/ElizaSwiftPackageApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8", - "version" : "1.25.2" + "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", + "version" : "1.26.0" } }, { diff --git a/Examples/buf.gen.yaml b/Examples/buf.gen.yaml index 1f36814e..f1bdb041 100644 --- a/Examples/buf.gen.yaml +++ b/Examples/buf.gen.yaml @@ -1,6 +1,6 @@ version: v1 plugins: - - plugin: buf.build/apple/swift:v1.25.2 + - plugin: buf.build/apple/swift:v1.26.0 opt: Visibility=Internal out: ./ElizaSharedSources/GeneratedSources - name: connect-swift diff --git a/Libraries/Connect/buf.gen.yaml b/Libraries/Connect/buf.gen.yaml index d6a17b0d..24f506b0 100644 --- a/Libraries/Connect/buf.gen.yaml +++ b/Libraries/Connect/buf.gen.yaml @@ -1,5 +1,5 @@ version: v1 plugins: - - plugin: buf.build/apple/swift:v1.25.2 + - plugin: buf.build/apple/swift:v1.26.0 opt: Visibility=Internal out: ./Internal/GeneratedSources diff --git a/Package.resolved b/Package.resolved index 6164f292..3a1f7c67 100644 --- a/Package.resolved +++ b/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8", - "version" : "1.25.2" + "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", + "version" : "1.26.0" } }, { diff --git a/Package.swift b/Package.swift index 0f0ee31a..72a18ee2 100644 --- a/Package.swift +++ b/Package.swift @@ -61,7 +61,7 @@ let package = Package( ), .package( url: "https://github.com/apple/swift-protobuf.git", - from: "1.25.2" + from: "1.26.0" ), ], targets: [ diff --git a/Tests/ConformanceClient/buf.gen.yaml b/Tests/ConformanceClient/buf.gen.yaml index 29c8d838..52510a07 100644 --- a/Tests/ConformanceClient/buf.gen.yaml +++ b/Tests/ConformanceClient/buf.gen.yaml @@ -1,6 +1,6 @@ version: v1 plugins: - - plugin: buf.build/apple/swift:v1.25.2 + - plugin: buf.build/apple/swift:v1.26.0 opt: Visibility=Internal out: ./GeneratedSources - name: connect-swift From 155ec18d7e99afe3399c4270a80a191ade7b5b87 Mon Sep 17 00:00:00 2001 From: Michael Rebello Date: Thu, 28 Mar 2024 16:48:19 -0700 Subject: [PATCH 2/2] Update client_compat.pb.swift --- .../connectrpc/conformance/v1/client_compat.pb.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tests/ConformanceClient/GeneratedSources/connectrpc/conformance/v1/client_compat.pb.swift b/Tests/ConformanceClient/GeneratedSources/connectrpc/conformance/v1/client_compat.pb.swift index c058b62a..febfee77 100644 --- a/Tests/ConformanceClient/GeneratedSources/connectrpc/conformance/v1/client_compat.pb.swift +++ b/Tests/ConformanceClient/GeneratedSources/connectrpc/conformance/v1/client_compat.pb.swift @@ -495,7 +495,15 @@ extension Connectrpc_Conformance_V1_ClientCompatRequest: SwiftProtobuf.Message, var _cancel: Connectrpc_Conformance_V1_ClientCompatRequest.Cancel? = nil var _rawRequest: Connectrpc_Conformance_V1_RawHTTPRequest? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {}