Skip to content

Commit 89f530f

Browse files
Auto update with latest AS Release v87.0.0 (#22)
* Updates Package.swift with v87.0.0 release * Version 87.0.0
1 parent e8d9b43 commit 89f530f

File tree

4 files changed

+94
-82
lines changed

4 files changed

+94
-82
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ let package = Package(
4141
// For release artifacts, reference the MozillaRustComponents as a URL with checksum.
4242
// IMPORTANT: The checksum has to be on the line directly after the `url`
4343
// this is important for our release script so that all values are updated correctly
44-
url: "https://119127-129966583-gh.circle-artifacts.com/0/dist/MozillaRustComponents.xcframework.zip",
45-
checksum: "2cf6f6e5db8e995773560ad3074722b7ec3ed05a6c2d33c6f90bbffce866ed03"
44+
url: "https://github.com/mozilla/application-services/releases/download/v87.0.0/MozillaRustComponents.xcframework.zip",
45+
checksum: "f69d5c7bcde788d709944bacdeb72888beed1ec6b0a1ad32a092becdc156854b"
4646

4747
// For local testing, you can point at an (unzipped) XCFramework that's part of the repo.
4848
// Note that you have to actually check it in and make a tag for it to work correctly.

generated/places/Generated/places_msg_types.pb.swift

Lines changed: 64 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -561,24 +561,28 @@ extension MsgTypes_HistoryVisitInfo: SwiftProtobuf.Message, SwiftProtobuf._Messa
561561
}
562562

563563
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
564-
if let v = self._url {
564+
// The use of inline closures is to circumvent an issue where the compiler
565+
// allocates stack space for every if/case branch local when no optimizations
566+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
567+
// https://github.com/apple/swift-protobuf/issues/1182
568+
try { if let v = self._url {
565569
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
566-
}
567-
if let v = self._title {
570+
} }()
571+
try { if let v = self._title {
568572
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
569-
}
570-
if let v = self._timestamp {
573+
} }()
574+
try { if let v = self._timestamp {
571575
try visitor.visitSingularInt64Field(value: v, fieldNumber: 3)
572-
}
573-
if let v = self._visitType {
576+
} }()
577+
try { if let v = self._visitType {
574578
try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
575-
}
576-
if let v = self._isHidden {
579+
} }()
580+
try { if let v = self._isHidden {
577581
try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
578-
}
579-
if let v = self._previewImageURL {
582+
} }()
583+
try { if let v = self._previewImageURL {
580584
try visitor.visitSingularStringField(value: v, fieldNumber: 6)
581-
}
585+
} }()
582586
try unknownFields.traverse(visitor: &visitor)
583587
}
584588

@@ -661,15 +665,19 @@ extension MsgTypes_HistoryVisitInfosWithBound: SwiftProtobuf.Message, SwiftProto
661665
}
662666

663667
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
668+
// The use of inline closures is to circumvent an issue where the compiler
669+
// allocates stack space for every if/case branch local when no optimizations
670+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
671+
// https://github.com/apple/swift-protobuf/issues/1182
664672
if !self.infos.isEmpty {
665673
try visitor.visitRepeatedMessageField(value: self.infos, fieldNumber: 1)
666674
}
667-
if let v = self._bound {
675+
try { if let v = self._bound {
668676
try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
669-
}
670-
if let v = self._offset {
677+
} }()
678+
try { if let v = self._offset {
671679
try visitor.visitSingularInt64Field(value: v, fieldNumber: 3)
672-
}
680+
} }()
673681
try unknownFields.traverse(visitor: &visitor)
674682
}
675683

@@ -721,39 +729,43 @@ extension MsgTypes_BookmarkNode: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
721729
}
722730

723731
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
724-
if let v = self._nodeType {
732+
// The use of inline closures is to circumvent an issue where the compiler
733+
// allocates stack space for every if/case branch local when no optimizations
734+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
735+
// https://github.com/apple/swift-protobuf/issues/1182
736+
try { if let v = self._nodeType {
725737
try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
726-
}
727-
if let v = self._guid {
738+
} }()
739+
try { if let v = self._guid {
728740
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
729-
}
730-
if let v = self._dateAdded {
741+
} }()
742+
try { if let v = self._dateAdded {
731743
try visitor.visitSingularInt64Field(value: v, fieldNumber: 3)
732-
}
733-
if let v = self._lastModified {
744+
} }()
745+
try { if let v = self._lastModified {
734746
try visitor.visitSingularInt64Field(value: v, fieldNumber: 4)
735-
}
736-
if let v = self._parentGuid {
747+
} }()
748+
try { if let v = self._parentGuid {
737749
try visitor.visitSingularStringField(value: v, fieldNumber: 5)
738-
}
739-
if let v = self._position {
750+
} }()
751+
try { if let v = self._position {
740752
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 6)
741-
}
742-
if let v = self._title {
753+
} }()
754+
try { if let v = self._title {
743755
try visitor.visitSingularStringField(value: v, fieldNumber: 7)
744-
}
745-
if let v = self._url {
756+
} }()
757+
try { if let v = self._url {
746758
try visitor.visitSingularStringField(value: v, fieldNumber: 8)
747-
}
759+
} }()
748760
if !self.childGuids.isEmpty {
749761
try visitor.visitRepeatedStringField(value: self.childGuids, fieldNumber: 9)
750762
}
751763
if !self.childNodes.isEmpty {
752764
try visitor.visitRepeatedMessageField(value: self.childNodes, fieldNumber: 10)
753765
}
754-
if let v = self._haveChildNodes {
766+
try { if let v = self._haveChildNodes {
755767
try visitor.visitSingularBoolField(value: v, fieldNumber: 11)
756-
}
768+
} }()
757769
try unknownFields.traverse(visitor: &visitor)
758770
}
759771

@@ -838,15 +850,19 @@ extension MsgTypes_SearchResultMessage: SwiftProtobuf.Message, SwiftProtobuf._Me
838850
}
839851

840852
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
841-
if let v = self._url {
853+
// The use of inline closures is to circumvent an issue where the compiler
854+
// allocates stack space for every if/case branch local when no optimizations
855+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
856+
// https://github.com/apple/swift-protobuf/issues/1182
857+
try { if let v = self._url {
842858
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
843-
}
844-
if let v = self._title {
859+
} }()
860+
try { if let v = self._title {
845861
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
846-
}
847-
if let v = self._frecency {
862+
} }()
863+
try { if let v = self._frecency {
848864
try visitor.visitSingularInt64Field(value: v, fieldNumber: 3)
849-
}
865+
} }()
850866
if !self.reasons.isEmpty {
851867
try visitor.visitPackedEnumField(value: self.reasons, fieldNumber: 4)
852868
}
@@ -926,12 +942,16 @@ extension MsgTypes_TopFrecentSiteInfo: SwiftProtobuf.Message, SwiftProtobuf._Mes
926942
}
927943

928944
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
929-
if let v = self._url {
945+
// The use of inline closures is to circumvent an issue where the compiler
946+
// allocates stack space for every if/case branch local when no optimizations
947+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
948+
// https://github.com/apple/swift-protobuf/issues/1182
949+
try { if let v = self._url {
930950
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
931-
}
932-
if let v = self._title {
951+
} }()
952+
try { if let v = self._title {
933953
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
934-
}
954+
} }()
935955
try unknownFields.traverse(visitor: &visitor)
936956
}
937957

generated/push/Generated/push.swift

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ private extension RustBuffer {
1414
// Allocate a new buffer, copying the contents of a `UInt8` array.
1515
init(bytes: [UInt8]) {
1616
let rbuf = bytes.withUnsafeBufferPointer { ptr in
17-
try! rustCall { ffi_push_b1b4_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) }
17+
try! rustCall { ffi_push_6d2f_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) }
1818
}
1919
self.init(capacity: rbuf.capacity, len: rbuf.len, data: rbuf.data)
2020
}
2121

2222
// Frees the buffer in place.
2323
// The buffer must not be used after this is called.
2424
func deallocate() {
25-
try! rustCall { ffi_push_b1b4_rustbuffer_free(self, $0) }
25+
try! rustCall { ffi_push_6d2f_rustbuffer_free(self, $0) }
2626
}
2727
}
2828

@@ -273,7 +273,7 @@ extension String: ViaFfi {
273273

274274
fileprivate static func lift(_ v: FfiType) throws -> Self {
275275
defer {
276-
try! rustCall { ffi_push_b1b4_rustbuffer_free(v, $0) }
276+
try! rustCall { ffi_push_6d2f_rustbuffer_free(v, $0) }
277277
}
278278
if v.data == nil {
279279
return String()
@@ -289,7 +289,7 @@ extension String: ViaFfi {
289289
// The swift string gives us a trailing null byte, we don't want it.
290290
let buf = UnsafeBufferPointer(rebasing: ptr.prefix(upTo: ptr.count - 1))
291291
let bytes = ForeignBytes(bufferPointer: buf)
292-
return try! rustCall { ffi_push_b1b4_rustbuffer_from_bytes(bytes, $0) }
292+
return try! rustCall { ffi_push_6d2f_rustbuffer_from_bytes(bytes, $0) }
293293
}
294294
}
295295
}
@@ -598,15 +598,13 @@ private func makeRustCall<T>(_ callback: (UnsafeMutablePointer<RustCallStatus>)
598598
}
599599

600600
public struct DispatchInfo {
601-
public var uaid: String
602601
public var scope: String
603602
public var endpoint: String
604603
public var appServerKey: String?
605604

606605
// Default memberwise initializers are never public by default, so we
607606
// declare one manually.
608-
public init(uaid: String, scope: String, endpoint: String, appServerKey: String?) {
609-
self.uaid = uaid
607+
public init(scope: String, endpoint: String, appServerKey: String?) {
610608
self.scope = scope
611609
self.endpoint = endpoint
612610
self.appServerKey = appServerKey
@@ -615,9 +613,6 @@ public struct DispatchInfo {
615613

616614
extension DispatchInfo: Equatable, Hashable {
617615
public static func == (lhs: DispatchInfo, rhs: DispatchInfo) -> Bool {
618-
if lhs.uaid != rhs.uaid {
619-
return false
620-
}
621616
if lhs.scope != rhs.scope {
622617
return false
623618
}
@@ -631,7 +626,6 @@ extension DispatchInfo: Equatable, Hashable {
631626
}
632627

633628
public func hash(into hasher: inout Hasher) {
634-
hasher.combine(uaid)
635629
hasher.combine(scope)
636630
hasher.combine(endpoint)
637631
hasher.combine(appServerKey)
@@ -641,15 +635,13 @@ extension DispatchInfo: Equatable, Hashable {
641635
private extension DispatchInfo {
642636
static func read(from buf: Reader) throws -> DispatchInfo {
643637
return try DispatchInfo(
644-
uaid: String.read(from: buf),
645638
scope: String.read(from: buf),
646639
endpoint: String.read(from: buf),
647640
appServerKey: String?.read(from: buf)
648641
)
649642
}
650643

651644
func write(into buf: Writer) {
652-
uaid.write(into: buf)
653645
scope.write(into: buf)
654646
endpoint.write(into: buf)
655647
appServerKey.write(into: buf)
@@ -858,69 +850,69 @@ public class PushManager: PushManagerProtocol {
858850
self.pointer = pointer
859851
}
860852

861-
public convenience init(senderId: String, serverHost: String = "updates.push.services.mozilla.com", httpProtocol: String = "https", bridgeType: BridgeType, registrationId: String, databasePath: String = "push.sqlite") throws {
853+
public convenience init(senderId: String, serverHost: String = "updates.push.services.mozilla.com", httpProtocol: String = "https", bridgeType: BridgeType, registrationId: String = "", databasePath: String = "push.sqlite") throws {
862854
self.init(unsafeFromRawPointer: try
863855

864856
rustCallWithError(PushError.self) {
865-
push_b1b4_PushManager_new(senderId.lower(), serverHost.lower(), httpProtocol.lower(), bridgeType.lower(), registrationId.lower(), databasePath.lower(), $0)
857+
push_6d2f_PushManager_new(senderId.lower(), serverHost.lower(), httpProtocol.lower(), bridgeType.lower(), registrationId.lower(), databasePath.lower(), $0)
866858
})
867859
}
868860

869861
deinit {
870-
try! rustCall { ffi_push_b1b4_PushManager_object_free(pointer, $0) }
862+
try! rustCall { ffi_push_6d2f_PushManager_object_free(pointer, $0) }
871863
}
872864

873865
public func subscribe(channelId: String = "", scope: String = "", appServerSey: String? = nil) throws -> SubscriptionResponse {
874866
let _retval = try
875867
rustCallWithError(PushError.self) {
876-
push_b1b4_PushManager_subscribe(self.pointer, channelId.lower(), scope.lower(), appServerSey.lower(), $0)
868+
push_6d2f_PushManager_subscribe(self.pointer, channelId.lower(), scope.lower(), appServerSey.lower(), $0)
877869
}
878870
return try SubscriptionResponse.lift(_retval)
879871
}
880872

881873
public func unsubscribe(channelId: String) throws -> Bool {
882874
let _retval = try
883875
rustCallWithError(PushError.self) {
884-
push_b1b4_PushManager_unsubscribe(self.pointer, channelId.lower(), $0)
876+
push_6d2f_PushManager_unsubscribe(self.pointer, channelId.lower(), $0)
885877
}
886878
return try Bool.lift(_retval)
887879
}
888880

889881
public func unsubscribeAll() throws {
890882
try
891883
rustCallWithError(PushError.self) {
892-
push_b1b4_PushManager_unsubscribe_all(self.pointer, $0)
884+
push_6d2f_PushManager_unsubscribe_all(self.pointer, $0)
893885
}
894886
}
895887

896888
public func update(registrationToken: String) throws -> Bool {
897889
let _retval = try
898890
rustCallWithError(PushError.self) {
899-
push_b1b4_PushManager_update(self.pointer, registrationToken.lower(), $0)
891+
push_6d2f_PushManager_update(self.pointer, registrationToken.lower(), $0)
900892
}
901893
return try Bool.lift(_retval)
902894
}
903895

904896
public func verifyConnection() throws -> [PushSubscriptionChanged] {
905897
let _retval = try
906898
rustCallWithError(PushError.self) {
907-
push_b1b4_PushManager_verify_connection(self.pointer, $0)
899+
push_6d2f_PushManager_verify_connection(self.pointer, $0)
908900
}
909901
return try [PushSubscriptionChanged].lift(_retval)
910902
}
911903

912904
public func decrypt(channelId: String, body: String, encoding: String = "aes128gcm", salt: String = "", dh: String = "") throws -> [Int8] {
913905
let _retval = try
914906
rustCallWithError(PushError.self) {
915-
push_b1b4_PushManager_decrypt(self.pointer, channelId.lower(), body.lower(), encoding.lower(), salt.lower(), dh.lower(), $0)
907+
push_6d2f_PushManager_decrypt(self.pointer, channelId.lower(), body.lower(), encoding.lower(), salt.lower(), dh.lower(), $0)
916908
}
917909
return try [Int8].lift(_retval)
918910
}
919911

920912
public func dispatchInfoForChid(channelId: String) throws -> DispatchInfo? {
921913
let _retval = try
922914
rustCallWithError(PushError.self) {
923-
push_b1b4_PushManager_dispatch_info_for_chid(self.pointer, channelId.lower(), $0)
915+
push_6d2f_PushManager_dispatch_info_for_chid(self.pointer, channelId.lower(), $0)
924916
}
925917
return try DispatchInfo?.lift(_retval)
926918
}

0 commit comments

Comments
 (0)