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

build(deps): update jni-sys requirement from 0.3 to 0.4 #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 2, 2023

Updates the requirements on jni-sys to permit the latest version.

Release notes

Sourced from jni-sys's releases.

v0.4.0

It's alive! 😃

It's been about 6 years since the last release and although that's generally been OK, since the JNI API doesn't change that frequently, there have been a number of paper cuts adding up that this release hopefully helps to address.

Thanks to @​sfackler for transferring the repo to the https://github.com/jni-rs Github organisation where we can hopefully keep the flame alive.

The most notable changes are that jboolean is now an alias for bool and that JNINativeInterface_ is now a union that namespaces the functions based on the JNI version when each function was added to the spec. Please see below for more details.

Added

  • Added JNI_VERSION_9, JNI_VERSION_10, JNI_VERSION_19, JNI_VERSION_20 and JNI_VERSION_21 constants
  • Added GetModule() to JNINativeInterface (#22)
  • IsVirtualThread() to JNINativeInterface (#32)
  • Implemented Debug trait for all types (#31)
  • Added support for no_std environments (#12)

Changed

  • jboolean is now an alias for bool instead of u8 (#23)

  • The JNIInvokeInterface_ and JNINativeInterface_ structs were turned into unions that namespace functions by version (#28):

    This makes it much clearer what version of JNI you require to access any function safely.

    So instead of a struct like:

    struct JNINativeInterface_ {
        pub reserved0: *mut c_void,
        ..
        pub GetVersion: unsafe extern "system" fn(env: *mut JNIEnv) -> jint,
        ..
        pub NewLocalRef: unsafe extern "system" fn(env: *mut JNIEnv, ref_: jobject) -> jobject,
    }

    there is now a union like:

    union JNINativeInterface_ {
        v1_1: JNINativeInterface__1_1,
        v1_2: JNINativeInterface__1_2,
        reserved: JNINativeInterface__reserved,
    }

    And you can access GetVersion like: env.v1_1.GetVersion and access NewLocalRef like: env.v1_2.NewLocalRef.

    Each version struct includes all functions for that version and lower, so it's also possible to access GetVersion like env.v1_2.GetVersion.

... (truncated)

Changelog

Sourced from jni-sys's changelog.

[0.4.0] - 2023-09-25

Added

  • Added JNI_VERSION_9, JNI_VERSION_10, JNI_VERSION_19, JNI_VERSION_20 and JNI_VERSION_21 constants
  • Added GetModule() to JNINativeInterface (#22)
  • IsVirtualThread() to JNINativeInterface (#32)
  • Implemented Debug trait for all types (#31)
  • Added support for no_std environments (#12)

Changed

  • jboolean is now an alias for bool instead of u8 (#23)

  • The JNIInvokeInterface_ and JNINativeInterface_ structs were turned into unions that namespace functions by version (#28):

    This makes it much clearer what version of JNI you require to access any function safely.

    So instead of a struct like:

    struct JNINativeInterface_ {
        pub reserved0: *mut c_void,
        ..
        pub GetVersion: unsafe extern "system" fn(env: *mut JNIEnv) -> jint,
        ..
        pub NewLocalRef: unsafe extern "system" fn(env: *mut JNIEnv, ref_: jobject) -> jobject,
    }

    there is now a union like:

    union JNINativeInterface_ {
        v1_1: JNINativeInterface__1_1,
        v1_2: JNINativeInterface__1_2,
        reserved: JNINativeInterface__reserved,
    }

    And you can access GetVersion like: env.v1_1.GetVersion and access NewLocalRef like: env.v1_2.NewLocalRef.

    Each version struct includes all functions for that version and lower, so it's also possible to access GetVersion like env.v1_2.GetVersion.

  • Function pointers are no longer wrapped in an Option<> (#25)

[0.3.0] - 2017-07-20

Changed

  • Changed jvalue into a union

... (truncated)

Commits
  • f1e890f Release 0.4.0
  • 6d57bdd jni-sys: package metadata updates
  • f94615b Add package exclusions
  • 296bc33 Update CHANGELOG
  • 1449565 jni-sys-macros: package metadata updates
  • 6ecb779 Add README for jni-sys-macros crate
  • 9500c5d Add IsVirtualThread to JNINativeInterface_
  • aa914ab Avoid checking more recent version constants in systest
  • 8379800 feat: append 20 and 21 consts to lib.rs
  • 3fcf285 Add version constants for Java 19
  • Additional commits viewable in compare view

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Oct 2, 2023
@MarijnS95
Copy link
Member

Blocked on jni-rs/jni-rs#478, just like the documentation in rust-mobile/ndk#433.

@dependabot dependabot bot force-pushed the dependabot/cargo/jni-sys-0.4 branch from 9fd62a7 to 487734b Compare October 15, 2023 19:40
Updates the requirements on [jni-sys](https://github.com/jni-rs/jni-sys) to permit the latest version.
- [Release notes](https://github.com/jni-rs/jni-sys/releases)
- [Changelog](https://github.com/jni-rs/jni-sys/blob/master/CHANGELOG.md)
- [Commits](jni-rs/jni-sys@v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: jni-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant