Skip to content

Commit 1c84642

Browse files
author
Firefox Sync Engineering
committed
Nightly auto-update (139.0.20250403050315)
1 parent 6759214 commit 1c84642

32 files changed

+2269
-1075
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 = "1e6a359f75c4c4523c5935f0bcb705c13155df1d2fd533ad114cc94ccd5cfdbb"
5-
let version = "139.0.20250402050327"
6-
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.139.20250402050327/artifacts/public/build/MozillaRustComponents.xcframework.zip"
4+
let checksum = "fbd91b60abd90c3aaa5c2bae2e2b86b52cef3db819bff2fd1e34ac4c98c72993"
5+
let version = "139.0.20250403050315"
6+
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.139.20250403050315/artifacts/public/build/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "26f34b60ab74bdbaacbfe49d10f1b0977fd096e3271145c773c79d8b25c8b873"
10-
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.139.20250402050327/artifacts/public/build/FocusRustComponents.xcframework.zip"
9+
let focusChecksum = "3982c55e015029e6cd83ffb383283c796831fac887047b6a35234f179eb25bf2"
10+
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.139.20250403050315/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: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- mode: Swift -*-
22

3-
// AUTOGENERATED BY glean_parser v16.2.0. DO NOT EDIT. DO NOT COMMIT.
3+
// AUTOGENERATED BY glean_parser v17.1.0. 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: 2025, month: 4, day: 2, hour: 5, minute: 24, second: 45))
26+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2025, month: 4, day: 3, hour: 5, minute: 44, second: 52))
2727
}
2828

2929
enum NimbusEvents {
@@ -1303,7 +1303,8 @@ extension GleanMetrics {
13031303
enabled: true,
13041304
schedulesPings: [],
13051305
reasonCodes: [],
1306-
followsCollectionEnabled: true
1306+
followsCollectionEnabled: true,
1307+
uploaderCapabilities: []
13071308
)
13081309

13091310
/// A ping sent for every bookmarks sync. It doesn't include the `client_id`
@@ -1317,7 +1318,8 @@ extension GleanMetrics {
13171318
enabled: true,
13181319
schedulesPings: [],
13191320
reasonCodes: [],
1320-
followsCollectionEnabled: true
1321+
followsCollectionEnabled: true,
1322+
uploaderCapabilities: []
13211323
)
13221324

13231325
/// A ping sent for every Credit Cards engine sync. It doesn't include the
@@ -1332,7 +1334,8 @@ extension GleanMetrics {
13321334
enabled: true,
13331335
schedulesPings: [],
13341336
reasonCodes: [],
1335-
followsCollectionEnabled: true
1337+
followsCollectionEnabled: true,
1338+
uploaderCapabilities: []
13361339
)
13371340

13381341
/// A ping sent for every history sync. It doesn't include the `client_id` because
@@ -1346,7 +1349,8 @@ extension GleanMetrics {
13461349
enabled: true,
13471350
schedulesPings: [],
13481351
reasonCodes: [],
1349-
followsCollectionEnabled: true
1352+
followsCollectionEnabled: true,
1353+
uploaderCapabilities: []
13501354
)
13511355

13521356
/// A ping sent for every logins/passwords sync. It doesn't include the `client_id`
@@ -1360,7 +1364,8 @@ extension GleanMetrics {
13601364
enabled: true,
13611365
schedulesPings: [],
13621366
reasonCodes: [],
1363-
followsCollectionEnabled: true
1367+
followsCollectionEnabled: true,
1368+
uploaderCapabilities: []
13641369
)
13651370

13661371
/// A summary ping, sent every time a sync is performed. During each Sync one or
@@ -1383,7 +1388,8 @@ extension GleanMetrics {
13831388
enabled: true,
13841389
schedulesPings: [],
13851390
reasonCodes: [],
1386-
followsCollectionEnabled: true
1391+
followsCollectionEnabled: true,
1392+
uploaderCapabilities: []
13871393
)
13881394

13891395
/// A ping sent for every Tabs engine sync. It doesn't include the `client_id`
@@ -1397,7 +1403,8 @@ extension GleanMetrics {
13971403
enabled: true,
13981404
schedulesPings: [],
13991405
reasonCodes: [],
1400-
followsCollectionEnabled: true
1406+
followsCollectionEnabled: true,
1407+
uploaderCapabilities: []
14011408
)
14021409

14031410
}

swift-source/all/Generated/as_ohttp_client.swift

Lines changed: 59 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ private func makeRustCall<T, E: Swift.Error>(
281281
_ callback: (UnsafeMutablePointer<RustCallStatus>) -> T,
282282
errorHandler: ((RustBuffer) throws -> E)?
283283
) throws -> T {
284-
uniffiEnsureInitialized()
284+
uniffiEnsureAsOhttpClientInitialized()
285285
var callStatus = RustCallStatus.init()
286286
let returnedVal = callback(&callStatus)
287287
try uniffiCheckCallStatus(callStatus: callStatus, errorHandler: errorHandler)
@@ -352,9 +352,10 @@ private func uniffiTraitInterfaceCallWithError<T, E>(
352352
callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error))
353353
}
354354
}
355-
fileprivate class UniffiHandleMap<T> {
356-
private var map: [UInt64: T] = [:]
355+
fileprivate final class UniffiHandleMap<T>: @unchecked Sendable {
356+
// All mutation happens with this lock held, which is why we implement @unchecked Sendable.
357357
private let lock = NSLock()
358+
private var map: [UInt64: T] = [:]
358359
private var currentHandle: UInt64 = 1
359360

360361
func insert(obj: T) -> UInt64 {
@@ -392,6 +393,7 @@ fileprivate class UniffiHandleMap<T> {
392393
}
393394
}
394395

396+
395397
// Public interface members begin here.
396398

397399

@@ -475,7 +477,7 @@ fileprivate struct FfiConverterString: FfiConverter {
475477
* Each OHTTP request-reply exchange needs to create an OhttpSession
476478
* object to manage encryption state.
477479
*/
478-
public protocol OhttpSessionProtocol : AnyObject {
480+
public protocol OhttpSessionProtocol: AnyObject {
479481

480482
/**
481483
* Decypt and unpack the response from the Relay for the previously
@@ -496,8 +498,7 @@ public protocol OhttpSessionProtocol : AnyObject {
496498
* Each OHTTP request-reply exchange needs to create an OhttpSession
497499
* object to manage encryption state.
498500
*/
499-
open class OhttpSession:
500-
OhttpSessionProtocol {
501+
open class OhttpSession: OhttpSessionProtocol, @unchecked Sendable {
501502
fileprivate let pointer: UnsafeMutableRawPointer!
502503

503504
/// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly.
@@ -538,7 +539,7 @@ open class OhttpSession:
538539
*/
539540
public convenience init(config: [UInt8])throws {
540541
let pointer =
541-
try rustCallWithError(FfiConverterTypeOhttpError.lift) {
542+
try rustCallWithError(FfiConverterTypeOhttpError_lift) {
542543
uniffi_as_ohttp_client_fn_constructor_ohttpsession_new(
543544
FfiConverterSequenceUInt8.lower(config),$0
544545
)
@@ -562,8 +563,8 @@ public convenience init(config: [UInt8])throws {
562563
* encapsulated request. You must use the same OhttpSession that
563564
* generated the request message.
564565
*/
565-
open func decapsulate(encoded: [UInt8])throws -> OhttpResponse {
566-
return try FfiConverterTypeOhttpResponse.lift(try rustCallWithError(FfiConverterTypeOhttpError.lift) {
566+
open func decapsulate(encoded: [UInt8])throws -> OhttpResponse {
567+
return try FfiConverterTypeOhttpResponse_lift(try rustCallWithError(FfiConverterTypeOhttpError_lift) {
567568
uniffi_as_ohttp_client_fn_method_ohttpsession_decapsulate(self.uniffiClonePointer(),
568569
FfiConverterSequenceUInt8.lower(encoded),$0
569570
)
@@ -575,8 +576,8 @@ open func decapsulate(encoded: [UInt8])throws -> OhttpResponse {
575576
* payload using HPKE. The caller is responsible for sending the
576577
* resulting message to the Relay.
577578
*/
578-
open func encapsulate(method: String, scheme: String, server: String, endpoint: String, headers: [String: String], payload: [UInt8])throws -> [UInt8] {
579-
return try FfiConverterSequenceUInt8.lift(try rustCallWithError(FfiConverterTypeOhttpError.lift) {
579+
open func encapsulate(method: String, scheme: String, server: String, endpoint: String, headers: [String: String], payload: [UInt8])throws -> [UInt8] {
580+
return try FfiConverterSequenceUInt8.lift(try rustCallWithError(FfiConverterTypeOhttpError_lift) {
580581
uniffi_as_ohttp_client_fn_method_ohttpsession_encapsulate(self.uniffiClonePointer(),
581582
FfiConverterString.lower(method),
582583
FfiConverterString.lower(scheme),
@@ -591,6 +592,7 @@ open func encapsulate(method: String, scheme: String, server: String, endpoint:
591592

592593
}
593594

595+
594596
#if swift(>=5.8)
595597
@_documentation(visibility: private)
596598
#endif
@@ -626,8 +628,6 @@ public struct FfiConverterTypeOhttpSession: FfiConverter {
626628
}
627629

628630

629-
630-
631631
#if swift(>=5.8)
632632
@_documentation(visibility: private)
633633
#endif
@@ -645,11 +645,13 @@ public func FfiConverterTypeOhttpSession_lower(_ value: OhttpSession) -> UnsafeM
645645

646646

647647

648+
649+
648650
/**
649651
* A testing interface for decrypting and responding to OHTTP messages. This
650652
* should only be used for testing.
651653
*/
652-
public protocol OhttpTestServerProtocol : AnyObject {
654+
public protocol OhttpTestServerProtocol: AnyObject {
653655

654656
/**
655657
* Return the unique encryption key config for this instance of test server.
@@ -665,8 +667,7 @@ public protocol OhttpTestServerProtocol : AnyObject {
665667
* A testing interface for decrypting and responding to OHTTP messages. This
666668
* should only be used for testing.
667669
*/
668-
open class OhttpTestServer:
669-
OhttpTestServerProtocol {
670+
open class OhttpTestServer: OhttpTestServerProtocol, @unchecked Sendable {
670671
fileprivate let pointer: UnsafeMutableRawPointer!
671672

672673
/// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly.
@@ -725,32 +726,33 @@ public convenience init() {
725726
/**
726727
* Return the unique encryption key config for this instance of test server.
727728
*/
728-
open func getConfig() -> [UInt8] {
729+
open func getConfig() -> [UInt8] {
729730
return try! FfiConverterSequenceUInt8.lift(try! rustCall() {
730731
uniffi_as_ohttp_client_fn_method_ohttptestserver_get_config(self.uniffiClonePointer(),$0
731732
)
732733
})
733734
}
734735

735-
open func receive(message: [UInt8])throws -> TestServerRequest {
736-
return try FfiConverterTypeTestServerRequest.lift(try rustCallWithError(FfiConverterTypeOhttpError.lift) {
736+
open func receive(message: [UInt8])throws -> TestServerRequest {
737+
return try FfiConverterTypeTestServerRequest_lift(try rustCallWithError(FfiConverterTypeOhttpError_lift) {
737738
uniffi_as_ohttp_client_fn_method_ohttptestserver_receive(self.uniffiClonePointer(),
738739
FfiConverterSequenceUInt8.lower(message),$0
739740
)
740741
})
741742
}
742743

743-
open func respond(response: OhttpResponse)throws -> [UInt8] {
744-
return try FfiConverterSequenceUInt8.lift(try rustCallWithError(FfiConverterTypeOhttpError.lift) {
744+
open func respond(response: OhttpResponse)throws -> [UInt8] {
745+
return try FfiConverterSequenceUInt8.lift(try rustCallWithError(FfiConverterTypeOhttpError_lift) {
745746
uniffi_as_ohttp_client_fn_method_ohttptestserver_respond(self.uniffiClonePointer(),
746-
FfiConverterTypeOhttpResponse.lower(response),$0
747+
FfiConverterTypeOhttpResponse_lower(response),$0
747748
)
748749
})
749750
}
750751

751752

752753
}
753754

755+
754756
#if swift(>=5.8)
755757
@_documentation(visibility: private)
756758
#endif
@@ -786,8 +788,6 @@ public struct FfiConverterTypeOhttpTestServer: FfiConverter {
786788
}
787789

788790

789-
790-
791791
#if swift(>=5.8)
792792
@_documentation(visibility: private)
793793
#endif
@@ -803,6 +803,8 @@ public func FfiConverterTypeOhttpTestServer_lower(_ value: OhttpTestServer) -> U
803803
}
804804

805805

806+
807+
806808
/**
807809
* The decrypted response from the Gateway/Target
808810
*/
@@ -820,6 +822,9 @@ public struct OhttpResponse {
820822
}
821823
}
822824

825+
#if compiler(>=6)
826+
extension OhttpResponse: Sendable {}
827+
#endif
823828

824829

825830
extension OhttpResponse: Equatable, Hashable {
@@ -844,6 +849,7 @@ extension OhttpResponse: Equatable, Hashable {
844849
}
845850

846851

852+
847853
#if swift(>=5.8)
848854
@_documentation(visibility: private)
849855
#endif
@@ -900,6 +906,9 @@ public struct TestServerRequest {
900906
}
901907
}
902908

909+
#if compiler(>=6)
910+
extension TestServerRequest: Sendable {}
911+
#endif
903912

904913

905914
extension TestServerRequest: Equatable, Hashable {
@@ -936,6 +945,7 @@ extension TestServerRequest: Equatable, Hashable {
936945
}
937946

938947

948+
939949
#if swift(>=5.8)
940950
@_documentation(visibility: private)
941951
#endif
@@ -1080,14 +1090,32 @@ public struct FfiConverterTypeOhttpError: FfiConverterRustBuffer {
10801090
}
10811091

10821092

1093+
#if swift(>=5.8)
1094+
@_documentation(visibility: private)
1095+
#endif
1096+
public func FfiConverterTypeOhttpError_lift(_ buf: RustBuffer) throws -> OhttpError {
1097+
return try FfiConverterTypeOhttpError.lift(buf)
1098+
}
1099+
1100+
#if swift(>=5.8)
1101+
@_documentation(visibility: private)
1102+
#endif
1103+
public func FfiConverterTypeOhttpError_lower(_ value: OhttpError) -> RustBuffer {
1104+
return FfiConverterTypeOhttpError.lower(value)
1105+
}
1106+
1107+
10831108
extension OhttpError: Equatable, Hashable {}
10841109

1110+
1111+
10851112
extension OhttpError: Foundation.LocalizedError {
10861113
public var errorDescription: String? {
10871114
String(reflecting: self)
10881115
}
10891116
}
10901117

1118+
10911119
#if swift(>=5.8)
10921120
@_documentation(visibility: private)
10931121
#endif
@@ -1146,9 +1174,9 @@ private enum InitializationResult {
11461174
}
11471175
// Use a global variable to perform the versioning checks. Swift ensures that
11481176
// the code inside is only computed once.
1149-
private var initializationResult: InitializationResult = {
1177+
private let initializationResult: InitializationResult = {
11501178
// Get the bindings contract version from our ComponentInterface
1151-
let bindings_contract_version = 26
1179+
let bindings_contract_version = 29
11521180
// Get the scaffolding contract version by calling the into the dylib
11531181
let scaffolding_contract_version = ffi_as_ohttp_client_uniffi_contract_version()
11541182
if bindings_contract_version != scaffolding_contract_version {
@@ -1169,17 +1197,19 @@ private var initializationResult: InitializationResult = {
11691197
if (uniffi_as_ohttp_client_checksum_method_ohttptestserver_respond() != 21845) {
11701198
return InitializationResult.apiChecksumMismatch
11711199
}
1172-
if (uniffi_as_ohttp_client_checksum_constructor_ohttpsession_new() != 63666) {
1200+
if (uniffi_as_ohttp_client_checksum_constructor_ohttpsession_new() != 12377) {
11731201
return InitializationResult.apiChecksumMismatch
11741202
}
1175-
if (uniffi_as_ohttp_client_checksum_constructor_ohttptestserver_new() != 42944) {
1203+
if (uniffi_as_ohttp_client_checksum_constructor_ohttptestserver_new() != 10284) {
11761204
return InitializationResult.apiChecksumMismatch
11771205
}
11781206

11791207
return InitializationResult.ok
11801208
}()
11811209

1182-
private func uniffiEnsureInitialized() {
1210+
// Make the ensure init function public so that other modules which have external type references to
1211+
// our types can call it.
1212+
public func uniffiEnsureAsOhttpClientInitialized() {
11831213
switch initializationResult {
11841214
case .ok:
11851215
break

0 commit comments

Comments
 (0)