Skip to content

Commit

Permalink
incrementing package updates for 0.5.16 release
Browse files Browse the repository at this point in the history
  • Loading branch information
heckj committed Jun 7, 2024
1 parent 17238f5 commit 26ccaf9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
16 changes: 16 additions & 0 deletions AutomergeUniffi/automerge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ public protocol DocProtocol: AnyObject {

func deleteInMap(obj: ObjId, key: String) throws

func difference(before: [ChangeHash], after: [ChangeHash]) -> [Patch]

func encodeChangesSince(heads: [ChangeHash]) throws -> [UInt8]

func encodeNewChanges() -> [UInt8]
Expand Down Expand Up @@ -798,6 +800,17 @@ open class Doc:
}
}

open func difference(before: [ChangeHash], after: [ChangeHash]) -> [Patch] {
try! FfiConverterSequenceTypePatch.lift(try! rustCall {
uniffi_uniffi_automerge_fn_method_doc_difference(
self.uniffiClonePointer(),
FfiConverterSequenceTypeChangeHash.lower(before),
FfiConverterSequenceTypeChangeHash.lower(after),
$0
)
})
}

open func encodeChangesSince(heads: [ChangeHash]) throws -> [UInt8] {
try FfiConverterSequenceUInt8.lift(rustCallWithError(FfiConverterTypeDocError.lift) {
uniffi_uniffi_automerge_fn_method_doc_encode_changes_since(
Expand Down Expand Up @@ -2948,6 +2961,9 @@ private var initializationResult: InitializationResult {
if uniffi_uniffi_automerge_checksum_method_doc_delete_in_map() != 1721 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_uniffi_automerge_checksum_method_doc_difference() != 13614 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_uniffi_automerge_checksum_method_doc_encode_changes_since() != 49806 {
return InitializationResult.apiChecksumMismatch
}
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ if ProcessInfo.processInfo.environment["LOCAL_BUILD"] != nil {
} else {
FFIbinaryTarget = .binaryTarget(
name: "automergeFFI",
url: "https://github.com/automerge/automerge-swift/releases/download/0.5.15/automergeFFI.xcframework.zip",
checksum: "d6fc0a66264491e88f1a0e06651e6b258fa5d7c79c763b7e026b0337c62ee74e"
url: "https://github.com/automerge/automerge-swift/releases/download/0.5.16/automergeFFI.xcframework.zip",
checksum: "434e7430c721b77b91038e6690f1a0a9a4b73e1b82b5f4cb6acfb1f950609cdf"
)
}

Expand Down
11 changes: 11 additions & 0 deletions Sources/_CAutomergeUniffi/include/automergeFFI.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ void uniffi_uniffi_automerge_fn_method_doc_delete_in_list(void*_Nonnull ptr, Rus
void uniffi_uniffi_automerge_fn_method_doc_delete_in_map(void*_Nonnull ptr, RustBuffer obj, RustBuffer key, RustCallStatus *_Nonnull out_status
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_FN_METHOD_DOC_DIFFERENCE
#define UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_FN_METHOD_DOC_DIFFERENCE
RustBuffer uniffi_uniffi_automerge_fn_method_doc_difference(void*_Nonnull ptr, RustBuffer before, RustBuffer after, RustCallStatus *_Nonnull out_status
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_FN_METHOD_DOC_ENCODE_CHANGES_SINCE
#define UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_FN_METHOD_DOC_ENCODE_CHANGES_SINCE
RustBuffer uniffi_uniffi_automerge_fn_method_doc_encode_changes_since(void*_Nonnull ptr, RustBuffer heads, RustCallStatus *_Nonnull out_status
Expand Down Expand Up @@ -965,6 +970,12 @@ uint16_t uniffi_uniffi_automerge_checksum_method_doc_delete_in_list(void
#define UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_CHECKSUM_METHOD_DOC_DELETE_IN_MAP
uint16_t uniffi_uniffi_automerge_checksum_method_doc_delete_in_map(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_CHECKSUM_METHOD_DOC_DIFFERENCE
#define UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_CHECKSUM_METHOD_DOC_DIFFERENCE
uint16_t uniffi_uniffi_automerge_checksum_method_doc_difference(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_UNIFFI_AUTOMERGE_CHECKSUM_METHOD_DOC_ENCODE_CHANGES_SINCE
Expand Down

0 comments on commit 26ccaf9

Please sign in to comment.