Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to latest uniffi #279

Merged
merged 4 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/src/main/java/libxmtp-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 3df528b5
Version: e08dc95c
Branch: main
Date: 2024-07-25 22:27:46 +0000
Date: 2024-07-26 17:36:50 +0000
22 changes: 11 additions & 11 deletions library/src/main/java/xmtpv3.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@file:Suppress("NAME_SHADOWING")

package uniffi.xmtpv3;
package uniffi.xmtpv3

// Common helper code.
//
Expand Down Expand Up @@ -250,7 +250,7 @@ internal open class UniffiRustCallStatus : Structure() {
}
}

class InternalException(message: String) : Exception(message)
class InternalException(message: String) : kotlin.Exception(message)

// Each top-level error class has a companion object that can lift the error from the call status's rust buffer
interface UniffiRustCallStatusErrorHandler<E> {
Expand All @@ -262,18 +262,18 @@ interface UniffiRustCallStatusErrorHandler<E> {
// synchronize itself

// Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err
private inline fun <U, E : Exception> uniffiRustCallWithError(
private inline fun <U, E : kotlin.Exception> uniffiRustCallWithError(
errorHandler: UniffiRustCallStatusErrorHandler<E>,
callback: (UniffiRustCallStatus) -> U,
): U {
var status = UniffiRustCallStatus();
var status = UniffiRustCallStatus()
val return_value = callback(status)
uniffiCheckCallStatus(errorHandler, status)
return return_value
}

// Check UniffiRustCallStatus and throw an error if the call wasn't successful
private fun <E : Exception> uniffiCheckCallStatus(
private fun <E : kotlin.Exception> uniffiCheckCallStatus(
errorHandler: UniffiRustCallStatusErrorHandler<E>,
status: UniffiRustCallStatus,
) {
Expand Down Expand Up @@ -305,7 +305,7 @@ object UniffiNullRustCallStatusErrorHandler : UniffiRustCallStatusErrorHandler<I

// Call a rust function that returns a plain value
private inline fun <U> uniffiRustCall(callback: (UniffiRustCallStatus) -> U): U {
return uniffiRustCallWithError(UniffiNullRustCallStatusErrorHandler, callback);
return uniffiRustCallWithError(UniffiNullRustCallStatusErrorHandler, callback)
}

internal inline fun <T> uniffiTraitInterfaceCall(
Expand All @@ -315,7 +315,7 @@ internal inline fun <T> uniffiTraitInterfaceCall(
) {
try {
writeReturn(makeCall())
} catch (e: Exception) {
} catch (e: kotlin.Exception) {
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
callStatus.error_buf = FfiConverterString.lower(e.toString())
}
Expand All @@ -329,7 +329,7 @@ internal inline fun <T, reified E : Throwable> uniffiTraitInterfaceCallWithError
) {
try {
writeReturn(makeCall())
} catch (e: Exception) {
} catch (e: kotlin.Exception) {
if (e is E) {
callStatus.code = UNIFFI_CALL_ERROR
callStatus.error_buf = lowerError(e)
Expand Down Expand Up @@ -2204,7 +2204,7 @@ internal object uniffiRustFutureContinuationCallbackImpl : UniffiRustFutureConti
}
}

internal suspend fun <T, F, E : Exception> uniffiRustCallAsync(
internal suspend fun <T, F, E : kotlin.Exception> uniffiRustCallAsync(
rustFuture: Long,
pollFunc: (Long, UniffiRustFutureContinuationCallback, Long) -> Unit,
completeFunc: (Long, UniffiRustCallStatus) -> F,
Expand Down Expand Up @@ -7268,7 +7268,7 @@ public object FfiConverterTypeFfiSortDirection : FfiConverterRustBuffer<FfiSortD
}


sealed class GenericException(message: String) : Exception(message) {
sealed class GenericException(message: String) : kotlin.Exception(message) {

class Client(message: String) : GenericException(message)

Expand Down Expand Up @@ -7385,7 +7385,7 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer<GenericExcep
}


sealed class SigningException(message: String) : Exception(message) {
sealed class SigningException(message: String) : kotlin.Exception(message) {

class Generic(message: String) : SigningException(message)

Expand Down
Binary file modified library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so
Binary file not shown.
Binary file modified library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so
Binary file not shown.
Binary file modified library/src/main/jniLibs/x86/libuniffi_xmtpv3.so
Binary file not shown.
Binary file modified library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so
Binary file not shown.
Loading