mozilla / uniffi-rs

a multi-language bindings generator for rust
https://mozilla.github.io/uniffi-rs/
Mozilla Public License 2.0
2.48k stars 211 forks source link

Java 8 deprecation is unexpected #2128

Open AugustoFKL opened 1 month ago

AugustoFKL commented 1 month ago

From the release 0.26.0, Java 8 seems to be not working for non-android systems (can't tell about those since I'm mostly a enterprise developer).

Java 8 is still one of the three versions with most users according to several studies, and making it not work without notice seems quite weird, so I think it wasn't intended...:?

This happened because the ObjectCleanerHelperJvm.kt file has a UniffiCleaner but the one used by the JavaLangRefCleaner is

 val cleaner = java.lang.ref.Cleaner.create()

Couldn't it be the following instead?

 val cleaner = UniffiCleaner.create()

?

This way it falls back to the internal JNA cleaner if not found, as previously.