Skip to content

Commit 57fa753

Browse files
author
Firefox Sync Engineering
committed
Nightly auto-update (132.0.20240905050320)
1 parent 31bd91d commit 57fa753

21 files changed

+290
-220
lines changed

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// swift-tools-version:5.4
22
import PackageDescription
33

4-
let checksum = "561998a70ad47623f2bc3a5f147ee82173b8eb98f2dafa6e7ae97016a152b914"
5-
let version = "132.0.20240904050246"
6-
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240904050246/artifacts/public/build/MozillaRustComponents.xcframework.zip"
4+
let checksum = "c19c3f721d38c5e175463c26537119ad2294117c2d781023310957588a189520"
5+
let version = "132.0.20240905050320"
6+
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240905050320/artifacts/public/build/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "a07c7cdc817508dcfdbbc32e88aedfc46ed78b3b5b898d547a535c3ca6a3b2f1"
10-
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240904050246/artifacts/public/build/FocusRustComponents.xcframework.zip"
9+
let focusChecksum = "3899c2d40dc8f3ce73fdb5e4298148602f912b53f46dd072a88f30a6780551f4"
10+
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240905050320/artifacts/public/build/FocusRustComponents.xcframework.zip"
1111
let package = Package(
1212
name: "MozillaRustComponentsSwift",
1313
platforms: [.iOS(.v14)],

swift-source/all/Generated/Metrics/Metrics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- mode: Swift -*-
22

3-
// AUTOGENERATED BY glean_parser v14.5.2. DO NOT EDIT. DO NOT COMMIT.
3+
// AUTOGENERATED BY glean_parser v15.0.1. DO NOT EDIT. DO NOT COMMIT.
44

55
#if canImport(Foundation)
66
import Foundation
@@ -23,7 +23,7 @@ extension GleanMetrics {
2323
// Intentionally left private, no external user can instantiate a new global object.
2424
}
2525

26-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 9, day: 4, hour: 5, minute: 12, second: 37))
26+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 9, day: 5, hour: 5, minute: 15, second: 13))
2727
}
2828

2929
enum NimbusEvents {

swift-source/all/Generated/as_ohttp_client.swift

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private func writeDouble(_ writer: inout [UInt8], _ value: Double) {
153153
}
154154

155155
// Protocol for types that transfer other types across the FFI. This is
156-
// analogous go the Rust trait of the same name.
156+
// analogous to the Rust trait of the same name.
157157
private protocol FfiConverter {
158158
associatedtype FfiType
159159
associatedtype SwiftType
@@ -254,19 +254,20 @@ private extension RustCallStatus {
254254
}
255255

256256
private func rustCall<T>(_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T) throws -> T {
257-
try makeRustCall(callback, errorHandler: nil)
257+
let neverThrow: ((RustBuffer) throws -> Never)? = nil
258+
return try makeRustCall(callback, errorHandler: neverThrow)
258259
}
259260

260-
private func rustCallWithError<T>(
261-
_ errorHandler: @escaping (RustBuffer) throws -> Error,
261+
private func rustCallWithError<T, E: Swift.Error>(
262+
_ errorHandler: @escaping (RustBuffer) throws -> E,
262263
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T
263264
) throws -> T {
264265
try makeRustCall(callback, errorHandler: errorHandler)
265266
}
266267

267-
private func makeRustCall<T>(
268+
private func makeRustCall<T, E: Swift.Error>(
268269
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T,
269-
errorHandler: ((RustBuffer) throws -> Error)?
270+
errorHandler: ((RustBuffer) throws -> E)?
270271
) throws -> T {
271272
uniffiEnsureInitialized()
272273
var callStatus = RustCallStatus()
@@ -275,9 +276,9 @@ private func makeRustCall<T>(
275276
return returnedVal
276277
}
277278

278-
private func uniffiCheckCallStatus(
279+
private func uniffiCheckCallStatus<E: Swift.Error>(
279280
callStatus: RustCallStatus,
280-
errorHandler: ((RustBuffer) throws -> Error)?
281+
errorHandler: ((RustBuffer) throws -> E)?
281282
) throws {
282283
switch callStatus.code {
283284
case CALL_SUCCESS:
@@ -898,7 +899,11 @@ public struct FfiConverterTypeOhttpError: FfiConverterRustBuffer {
898899

899900
extension OhttpError: Equatable, Hashable {}
900901

901-
extension OhttpError: Error {}
902+
extension OhttpError: Foundation.LocalizedError {
903+
public var errorDescription: String? {
904+
String(reflecting: self)
905+
}
906+
}
902907

903908
private struct FfiConverterSequenceUInt8: FfiConverterRustBuffer {
904909
typealias SwiftType = [UInt8]
@@ -951,9 +956,9 @@ private enum InitializationResult {
951956
case apiChecksumMismatch
952957
}
953958

954-
// Use a global variables to perform the versioning checks. Swift ensures that
959+
// Use a global variable to perform the versioning checks. Swift ensures that
955960
// the code inside is only computed once.
956-
private var initializationResult: InitializationResult {
961+
private var initializationResult: InitializationResult = {
957962
// Get the bindings contract version from our ComponentInterface
958963
let bindings_contract_version = 26
959964
// Get the scaffolding contract version by calling the into the dylib
@@ -984,7 +989,7 @@ private var initializationResult: InitializationResult {
984989
}
985990

986991
return InitializationResult.ok
987-
}
992+
}()
988993

989994
private func uniffiEnsureInitialized() {
990995
switch initializationResult {

swift-source/all/Generated/autofill.swift

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private func writeDouble(_ writer: inout [UInt8], _ value: Double) {
153153
}
154154

155155
// Protocol for types that transfer other types across the FFI. This is
156-
// analogous go the Rust trait of the same name.
156+
// analogous to the Rust trait of the same name.
157157
private protocol FfiConverter {
158158
associatedtype FfiType
159159
associatedtype SwiftType
@@ -254,19 +254,20 @@ private extension RustCallStatus {
254254
}
255255

256256
private func rustCall<T>(_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T) throws -> T {
257-
try makeRustCall(callback, errorHandler: nil)
257+
let neverThrow: ((RustBuffer) throws -> Never)? = nil
258+
return try makeRustCall(callback, errorHandler: neverThrow)
258259
}
259260

260-
private func rustCallWithError<T>(
261-
_ errorHandler: @escaping (RustBuffer) throws -> Error,
261+
private func rustCallWithError<T, E: Swift.Error>(
262+
_ errorHandler: @escaping (RustBuffer) throws -> E,
262263
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T
263264
) throws -> T {
264265
try makeRustCall(callback, errorHandler: errorHandler)
265266
}
266267

267-
private func makeRustCall<T>(
268+
private func makeRustCall<T, E: Swift.Error>(
268269
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T,
269-
errorHandler: ((RustBuffer) throws -> Error)?
270+
errorHandler: ((RustBuffer) throws -> E)?
270271
) throws -> T {
271272
uniffiEnsureInitialized()
272273
var callStatus = RustCallStatus()
@@ -275,9 +276,9 @@ private func makeRustCall<T>(
275276
return returnedVal
276277
}
277278

278-
private func uniffiCheckCallStatus(
279+
private func uniffiCheckCallStatus<E: Swift.Error>(
279280
callStatus: RustCallStatus,
280-
errorHandler: ((RustBuffer) throws -> Error)?
281+
errorHandler: ((RustBuffer) throws -> E)?
281282
) throws {
282283
switch callStatus.code {
283284
case CALL_SUCCESS:
@@ -1201,7 +1202,11 @@ public struct FfiConverterTypeAutofillApiError: FfiConverterRustBuffer {
12011202

12021203
extension AutofillApiError: Equatable, Hashable {}
12031204

1204-
extension AutofillApiError: Error {}
1205+
extension AutofillApiError: Foundation.LocalizedError {
1206+
public var errorDescription: String? {
1207+
String(reflecting: self)
1208+
}
1209+
}
12051210

12061211
private struct FfiConverterOptionInt64: FfiConverterRustBuffer {
12071212
typealias SwiftType = Int64?
@@ -1299,9 +1304,9 @@ private enum InitializationResult {
12991304
case apiChecksumMismatch
13001305
}
13011306

1302-
// Use a global variables to perform the versioning checks. Swift ensures that
1307+
// Use a global variable to perform the versioning checks. Swift ensures that
13031308
// the code inside is only computed once.
1304-
private var initializationResult: InitializationResult {
1309+
private var initializationResult: InitializationResult = {
13051310
// Get the bindings contract version from our ComponentInterface
13061311
let bindings_contract_version = 26
13071312
// Get the scaffolding contract version by calling the into the dylib
@@ -1365,7 +1370,7 @@ private var initializationResult: InitializationResult {
13651370
}
13661371

13671372
return InitializationResult.ok
1368-
}
1373+
}()
13691374

13701375
private func uniffiEnsureInitialized() {
13711376
switch initializationResult {

swift-source/all/Generated/errorsupport.swift

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private func writeDouble(_ writer: inout [UInt8], _ value: Double) {
153153
}
154154

155155
// Protocol for types that transfer other types across the FFI. This is
156-
// analogous go the Rust trait of the same name.
156+
// analogous to the Rust trait of the same name.
157157
private protocol FfiConverter {
158158
associatedtype FfiType
159159
associatedtype SwiftType
@@ -254,19 +254,20 @@ private extension RustCallStatus {
254254
}
255255

256256
private func rustCall<T>(_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T) throws -> T {
257-
try makeRustCall(callback, errorHandler: nil)
257+
let neverThrow: ((RustBuffer) throws -> Never)? = nil
258+
return try makeRustCall(callback, errorHandler: neverThrow)
258259
}
259260

260-
private func rustCallWithError<T>(
261-
_ errorHandler: @escaping (RustBuffer) throws -> Error,
261+
private func rustCallWithError<T, E: Swift.Error>(
262+
_ errorHandler: @escaping (RustBuffer) throws -> E,
262263
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T
263264
) throws -> T {
264265
try makeRustCall(callback, errorHandler: errorHandler)
265266
}
266267

267-
private func makeRustCall<T>(
268+
private func makeRustCall<T, E: Swift.Error>(
268269
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T,
269-
errorHandler: ((RustBuffer) throws -> Error)?
270+
errorHandler: ((RustBuffer) throws -> E)?
270271
) throws -> T {
271272
uniffiEnsureInitialized()
272273
var callStatus = RustCallStatus()
@@ -275,9 +276,9 @@ private func makeRustCall<T>(
275276
return returnedVal
276277
}
277278

278-
private func uniffiCheckCallStatus(
279+
private func uniffiCheckCallStatus<E: Swift.Error>(
279280
callStatus: RustCallStatus,
280-
errorHandler: ((RustBuffer) throws -> Error)?
281+
errorHandler: ((RustBuffer) throws -> E)?
281282
) throws {
282283
switch callStatus.code {
283284
case CALL_SUCCESS:
@@ -563,9 +564,9 @@ private enum InitializationResult {
563564
case apiChecksumMismatch
564565
}
565566

566-
// Use a global variables to perform the versioning checks. Swift ensures that
567+
// Use a global variable to perform the versioning checks. Swift ensures that
567568
// the code inside is only computed once.
568-
private var initializationResult: InitializationResult {
569+
private var initializationResult: InitializationResult = {
569570
// Get the bindings contract version from our ComponentInterface
570571
let bindings_contract_version = 26
571572
// Get the scaffolding contract version by calling the into the dylib
@@ -588,7 +589,7 @@ private var initializationResult: InitializationResult {
588589

589590
uniffiCallbackInitApplicationErrorReporter()
590591
return InitializationResult.ok
591-
}
592+
}()
592593

593594
private func uniffiEnsureInitialized() {
594595
switch initializationResult {

swift-source/all/Generated/fxa_client.swift

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private func writeDouble(_ writer: inout [UInt8], _ value: Double) {
153153
}
154154

155155
// Protocol for types that transfer other types across the FFI. This is
156-
// analogous go the Rust trait of the same name.
156+
// analogous to the Rust trait of the same name.
157157
private protocol FfiConverter {
158158
associatedtype FfiType
159159
associatedtype SwiftType
@@ -254,19 +254,20 @@ private extension RustCallStatus {
254254
}
255255

256256
private func rustCall<T>(_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T) throws -> T {
257-
try makeRustCall(callback, errorHandler: nil)
257+
let neverThrow: ((RustBuffer) throws -> Never)? = nil
258+
return try makeRustCall(callback, errorHandler: neverThrow)
258259
}
259260

260-
private func rustCallWithError<T>(
261-
_ errorHandler: @escaping (RustBuffer) throws -> Error,
261+
private func rustCallWithError<T, E: Swift.Error>(
262+
_ errorHandler: @escaping (RustBuffer) throws -> E,
262263
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T
263264
) throws -> T {
264265
try makeRustCall(callback, errorHandler: errorHandler)
265266
}
266267

267-
private func makeRustCall<T>(
268+
private func makeRustCall<T, E: Swift.Error>(
268269
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T,
269-
errorHandler: ((RustBuffer) throws -> Error)?
270+
errorHandler: ((RustBuffer) throws -> E)?
270271
) throws -> T {
271272
uniffiEnsureInitialized()
272273
var callStatus = RustCallStatus()
@@ -275,9 +276,9 @@ private func makeRustCall<T>(
275276
return returnedVal
276277
}
277278

278-
private func uniffiCheckCallStatus(
279+
private func uniffiCheckCallStatus<E: Swift.Error>(
279280
callStatus: RustCallStatus,
280-
errorHandler: ((RustBuffer) throws -> Error)?
281+
errorHandler: ((RustBuffer) throws -> E)?
281282
) throws {
282283
switch callStatus.code {
283284
case CALL_SUCCESS:
@@ -2340,7 +2341,11 @@ public struct FfiConverterTypeFxaError: FfiConverterRustBuffer {
23402341

23412342
extension FxaError: Equatable, Hashable {}
23422343

2343-
extension FxaError: Error {}
2344+
extension FxaError: Foundation.LocalizedError {
2345+
public var errorDescription: String? {
2346+
String(reflecting: self)
2347+
}
2348+
}
23442349

23452350
// Note that we don't yet support `indirect` for enums.
23462351
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
@@ -3144,9 +3149,9 @@ private enum InitializationResult {
31443149
case apiChecksumMismatch
31453150
}
31463151

3147-
// Use a global variables to perform the versioning checks. Swift ensures that
3152+
// Use a global variable to perform the versioning checks. Swift ensures that
31483153
// the code inside is only computed once.
3149-
private var initializationResult: InitializationResult {
3154+
private var initializationResult: InitializationResult = {
31503155
// Get the bindings contract version from our ComponentInterface
31513156
let bindings_contract_version = 26
31523157
// Get the scaffolding contract version by calling the into the dylib
@@ -3291,7 +3296,7 @@ private var initializationResult: InitializationResult {
32913296
}
32923297

32933298
return InitializationResult.ok
3294-
}
3299+
}()
32953300

32963301
private func uniffiEnsureInitialized() {
32973302
switch initializationResult {

0 commit comments

Comments
 (0)