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

chore(deps): Upgrade to ndk 0.9 and fix thread-safety interactions #956

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

MarijnS95
Copy link
Contributor

Closes #807
Closes #808
Closes #955

Most changes were copied over from my wry PR at tauri-apps/wry#1296. Most notably a &ThreadLooper is now passed to wry::android_setup() because we have one, and it gives important safety guarantees when it comes to registering callbacks on this looper, without (unnecessarily!) requiring Send. A thread-local requirement already exists for the JNIEnv that is passed around anyway.

Also note that certain workarounds and illogical inverted passes around key_code() handling are no longer needed, as the ndk crate now passes an enum with the raw i32 around so that the .into() conversion for i32 (the correct type) now becomes lossless.


In the end I'm also quite surprised how many linter warnings trigger in this crate, which don't seem to be down to just linting on an older Rust toolchain?

Copy link
Contributor

github-actions bot commented Jul 17, 2024

Package Changes Through f396851

There are 1 changes which include tao with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tao 0.28.1 0.29.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a change file in .changes directory?

Comment on lines +5 to 6
#[cfg(windows)]
use std::{num::NonZeroU32, rc::Rc};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there are many more "unused import" warnings like this: why the CI not catching those?

.changes/ndk-0.9.md Outdated Show resolved Hide resolved
Most changes were copied over from my `wry` PR at
tauri-apps/wry#1296.  Most notably a
`&ThreadLooper` is now passed to `wry::android_setup()` because we
have one, and it gives important safety guarantees when it comes to
registering callbacks on this looper, without (unnecessarily!) requiring
`Send`.  A thread-local requirement already exists for the `JNIEnv` that
is passed around anyway.

Also note that certain workarounds and illogical inverted passes
around `key_code()` handling are no longer needed, as the `ndk` crate
now passes an `enum` with the raw `i32` around so that the `.into()`
conversion for `i32` (the correct type) now becomes lossless.
@amrbashir amrbashir merged commit f575619 into tauri-apps:dev Jul 18, 2024
9 checks passed
@amrbashir
Copy link
Member

Thank you

@github-actions github-actions bot mentioned this pull request Jul 16, 2024
@MarijnS95 MarijnS95 deleted the ndk-0.9 branch July 18, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants