Skip to content

0.4.3 for UniFFI 0.31? 0.4.2 emits invalid Java (already fixed on 0.5.0) #68

Closed as not planned

Description

@ram0verflow

Context

I am generating Java from a crate that is still on UniFFI 0.31 (payjoin-ffi). uniffi-bindgen-java 0.4.2 reads that metadata; 0.5.0 does not (Unexpected metadata type code: 116).

What 0.4.2 emits

On error types that hold objects, javac fails:

  • extends SomeException, AutoCloseable (invalid; needs implements)
  • package-private void close() (must be public to implement AutoCloseable)
  • unnamed tuple/newtype fields become this.); because destroy_fields uses the empty field name instead of the field_name macro (this.v1)

0.5.0 already has these template fixes. I am not asking to change main.

Ask

If you still want a UniFFI 0.31 line, a 0.4.3 from tag 0.4.2 plus those two template changes would be enough. I backported that onto a fork so I could keep generating:

https://github.com/ram0verflow/uniffi-bindgen-java/tree/backport-0.4.2-error-templates

Compare vs 0.4.2: 0.4.2...ram0verflow:backport-0.4.2-error-templates

If you only support 0.5 / UniFFI 0.32 now, that is fine — I will pin the fork or use official Kotlin instead. No need to open a maintenance branch unless you want one.

I can open a PR against a 0.4.x branch if you create it.

Activity

  1. skeet70 commented on Sep 16, 2026

    @skeet70
    Member

    We don't have a desire to maintain backported fix branches, you can use your fork until you can move UniFFI forward, or switch to the Kotlin lib if you'd prefer to bring in/switch to coroutines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions