Skip to content

Commit 3ec042b

Browse files
github-actions[bot]Firefox Sync Engineering
andauthored
Auto update with latest AS Release v93.2.2 (#61)
* Updates Package.swift with v93.2.2 release * Version 93.2.2 Co-authored-by: Firefox Sync Engineering <[email protected]>
1 parent 4f949c9 commit 3ec042b

File tree

7 files changed

+48
-34
lines changed

7 files changed

+48
-34
lines changed

Package.swift

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

4-
let checksum = "ce42430c1f7150219ba4a37bd2e1565e80ec0b8befe807d5ecddc3a650a76629"
5-
let version = "v93.2.1"
4+
let checksum = "feae147a97201445d143922ecc68ee06c73e08f5724be958f1f685e857a9dfd7"
5+
let version = "v93.2.2"
66
let url = "https://github.com/mozilla/application-services/releases/download/\(version)/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "979ce87a0552c6de1e22f48a77565e8c1c8cf3779ca0f662a27e199f5c47ec3f"
9+
let focusChecksum = "2a21efea97f3066bc8f2b5f6f4ad725cb43457b3e7be1eac3ebd98edac97f92f"
1010
let focusUrl = "https://github.com/mozilla/application-services/releases/download/\(version)/FocusRustComponents.xcframework.zip"
1111
let package = Package(
1212
name: "MozillaRustComponentsSwift",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension GleanMetrics {
2222
// Intentionally left private, no external user can instantiate a new global object.
2323
}
2424

25-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 5, day: 26, hour: 15, minute: 8, second: 49))
25+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 5, day: 27, hour: 20, minute: 7, second: 43))
2626
}
2727

2828
enum NimbusEvents {

swift-source/all/Generated/tabs.swift

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ private extension RustBuffer {
1919
}
2020

2121
static func from(_ ptr: UnsafeBufferPointer<UInt8>) -> RustBuffer {
22-
try! rustCall { ffi_tabs_1245_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) }
22+
try! rustCall { ffi_tabs_60f6_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) }
2323
}
2424

2525
// Frees the buffer in place.
2626
// The buffer must not be used after this is called.
2727
func deallocate() {
28-
try! rustCall { ffi_tabs_1245_rustbuffer_free(self, $0) }
28+
try! rustCall { ffi_tabs_60f6_rustbuffer_free(self, $0) }
2929
}
3030
}
3131

@@ -362,52 +362,52 @@ public class TabsStore: TabsStoreProtocol {
362362
self.init(unsafeFromRawPointer: try!
363363

364364
rustCall {
365-
tabs_1245_TabsStore_new(
365+
tabs_60f6_TabsStore_new(
366366
FfiConverterString.lower(path), $0
367367
)
368368
})
369369
}
370370

371371
deinit {
372-
try! rustCall { ffi_tabs_1245_TabsStore_object_free(pointer, $0) }
372+
try! rustCall { ffi_tabs_60f6_TabsStore_object_free(pointer, $0) }
373373
}
374374

375375
public func getAll() -> [ClientRemoteTabs] {
376376
return try! FfiConverterSequenceTypeClientRemoteTabs.lift(
377377
try!
378378
rustCall {
379-
tabs_1245_TabsStore_get_all(self.pointer, $0)
379+
tabs_60f6_TabsStore_get_all(self.pointer, $0)
380380
}
381381
)
382382
}
383383

384384
public func setLocalTabs(remoteTabs: [RemoteTabRecord]) {
385385
try!
386386
rustCall {
387-
tabs_1245_TabsStore_set_local_tabs(self.pointer,
387+
tabs_60f6_TabsStore_set_local_tabs(self.pointer,
388388
FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs), $0)
389389
}
390390
}
391391

392392
public func registerWithSyncManager() {
393393
try!
394394
rustCall {
395-
tabs_1245_TabsStore_register_with_sync_manager(self.pointer, $0)
395+
tabs_60f6_TabsStore_register_with_sync_manager(self.pointer, $0)
396396
}
397397
}
398398

399399
public func reset() throws {
400400
try
401401
rustCallWithError(FfiConverterTypeTabsError.self) {
402-
tabs_1245_TabsStore_reset(self.pointer, $0)
402+
tabs_60f6_TabsStore_reset(self.pointer, $0)
403403
}
404404
}
405405

406406
public func sync(keyId: String, accessToken: String, syncKey: String, tokenserverUrl: String, localId: String) throws -> String {
407407
return try FfiConverterString.lift(
408408
try
409409
rustCallWithError(FfiConverterTypeTabsError.self) {
410-
tabs_1245_TabsStore_sync(self.pointer,
410+
tabs_60f6_TabsStore_sync(self.pointer,
411411
FfiConverterString.lower(keyId),
412412
FfiConverterString.lower(accessToken),
413413
FfiConverterString.lower(syncKey),
@@ -576,6 +576,9 @@ public enum TabsError {
576576
// Simple error enums only carry a message
577577
case JsonError(message: String)
578578

579+
// Simple error enums only carry a message
580+
case MissingLocalIdError(message: String)
581+
579582
// Simple error enums only carry a message
580583
case UrlParseError(message: String)
581584

@@ -604,15 +607,19 @@ private struct FfiConverterTypeTabsError: FfiConverterRustBuffer {
604607
message: try FfiConverterString.read(from: buf)
605608
)
606609

607-
case 4: return .UrlParseError(
610+
case 4: return .MissingLocalIdError(
611+
message: try FfiConverterString.read(from: buf)
612+
)
613+
614+
case 5: return .UrlParseError(
608615
message: try FfiConverterString.read(from: buf)
609616
)
610617

611-
case 5: return .SqlError(
618+
case 6: return .SqlError(
612619
message: try FfiConverterString.read(from: buf)
613620
)
614621

615-
case 6: return .OpenDatabaseError(
622+
case 7: return .OpenDatabaseError(
616623
message: try FfiConverterString.read(from: buf)
617624
)
618625

@@ -631,15 +638,18 @@ private struct FfiConverterTypeTabsError: FfiConverterRustBuffer {
631638
case let .JsonError(message):
632639
buf.writeInt(Int32(3))
633640
FfiConverterString.write(message, into: buf)
634-
case let .UrlParseError(message):
641+
case let .MissingLocalIdError(message):
635642
buf.writeInt(Int32(4))
636643
FfiConverterString.write(message, into: buf)
637-
case let .SqlError(message):
644+
case let .UrlParseError(message):
638645
buf.writeInt(Int32(5))
639646
FfiConverterString.write(message, into: buf)
640-
case let .OpenDatabaseError(message):
647+
case let .SqlError(message):
641648
buf.writeInt(Int32(6))
642649
FfiConverterString.write(message, into: buf)
650+
case let .OpenDatabaseError(message):
651+
buf.writeInt(Int32(7))
652+
FfiConverterString.write(message, into: buf)
643653
}
644654
}
645655
}

swift-source/all/Generated/tabsFFI.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,47 +46,47 @@ typedef struct RustCallStatus {
4646
// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️
4747
#endif // def UNIFFI_SHARED_H
4848

49-
void ffi_tabs_1245_TabsStore_object_free(
49+
void ffi_tabs_60f6_TabsStore_object_free(
5050
void*_Nonnull ptr,
5151
RustCallStatus *_Nonnull out_status
5252
);
53-
void*_Nonnull tabs_1245_TabsStore_new(
53+
void*_Nonnull tabs_60f6_TabsStore_new(
5454
RustBuffer path,
5555
RustCallStatus *_Nonnull out_status
5656
);
57-
RustBuffer tabs_1245_TabsStore_get_all(
57+
RustBuffer tabs_60f6_TabsStore_get_all(
5858
void*_Nonnull ptr,
5959
RustCallStatus *_Nonnull out_status
6060
);
61-
void tabs_1245_TabsStore_set_local_tabs(
61+
void tabs_60f6_TabsStore_set_local_tabs(
6262
void*_Nonnull ptr,RustBuffer remote_tabs,
6363
RustCallStatus *_Nonnull out_status
6464
);
65-
void tabs_1245_TabsStore_register_with_sync_manager(
65+
void tabs_60f6_TabsStore_register_with_sync_manager(
6666
void*_Nonnull ptr,
6767
RustCallStatus *_Nonnull out_status
6868
);
69-
void tabs_1245_TabsStore_reset(
69+
void tabs_60f6_TabsStore_reset(
7070
void*_Nonnull ptr,
7171
RustCallStatus *_Nonnull out_status
7272
);
73-
RustBuffer tabs_1245_TabsStore_sync(
73+
RustBuffer tabs_60f6_TabsStore_sync(
7474
void*_Nonnull ptr,RustBuffer key_id,RustBuffer access_token,RustBuffer sync_key,RustBuffer tokenserver_url,RustBuffer local_id,
7575
RustCallStatus *_Nonnull out_status
7676
);
77-
RustBuffer ffi_tabs_1245_rustbuffer_alloc(
77+
RustBuffer ffi_tabs_60f6_rustbuffer_alloc(
7878
int32_t size,
7979
RustCallStatus *_Nonnull out_status
8080
);
81-
RustBuffer ffi_tabs_1245_rustbuffer_from_bytes(
81+
RustBuffer ffi_tabs_60f6_rustbuffer_from_bytes(
8282
ForeignBytes bytes,
8383
RustCallStatus *_Nonnull out_status
8484
);
85-
void ffi_tabs_1245_rustbuffer_free(
85+
void ffi_tabs_60f6_rustbuffer_free(
8686
RustBuffer buf,
8787
RustCallStatus *_Nonnull out_status
8888
);
89-
RustBuffer ffi_tabs_1245_rustbuffer_reserve(
89+
RustBuffer ffi_tabs_60f6_rustbuffer_reserve(
9090
RustBuffer buf,int32_t additional,
9191
RustCallStatus *_Nonnull out_status
9292
);

swift-source/all/SyncUnlockInfo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ open class SyncUnlockInfo {
1212
public var syncKey: String
1313
public var tokenserverURL: String
1414
public var loginEncryptionKey: String
15-
public var tabsLocalId: String
15+
public var tabsLocalId: String?
1616

17-
public init(kid: String, fxaAccessToken: String, syncKey: String, tokenserverURL: String, loginEncryptionKey: String, tabsLocalId: String) {
17+
public init(kid: String, fxaAccessToken: String, syncKey: String, tokenserverURL: String, loginEncryptionKey: String, tabsLocalId: String? = nil) {
1818
self.kid = kid
1919
self.fxaAccessToken = fxaAccessToken
2020
self.syncKey = syncKey

swift-source/all/Tabs/Tabs.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@ open class TabsStorage {
3333
}
3434

3535
open func sync(unlockInfo: SyncUnlockInfo) throws -> String {
36+
guard let tabsLocalId = unlockInfo.tabsLocalId else {
37+
throw TabsError.MissingLocalIdError(message: "tabs local ID was not provided")
38+
}
39+
3640
return try queue.sync {
3741
return try self.store
3842
.sync(
3943
keyId: unlockInfo.kid,
4044
accessToken: unlockInfo.fxaAccessToken,
4145
syncKey: unlockInfo.syncKey,
4246
tokenserverUrl: unlockInfo.tokenserverURL,
43-
localId: unlockInfo.tabsLocalId
47+
localId: tabsLocalId
4448
)
4549
}
4650
}

swift-source/focus/Generated/Metrics/Metrics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension GleanMetrics {
2222
// Intentionally left private, no external user can instantiate a new global object.
2323
}
2424

25-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 5, day: 26, hour: 15, minute: 12, second: 40))
25+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 5, day: 27, hour: 20, minute: 10, second: 7))
2626
}
2727

2828
enum NimbusEvents {

0 commit comments

Comments
 (0)