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

Allow to specify minimum or maximum JNI versions #180

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

ekureina
Copy link
Contributor

Currently, can pick between JNI 1.6 or 1.8. Resolves to one JNI version.

Will fail to compile if users ask for conflicting JNI versions, but will try and resolve to a JNI version that everyone in the compile tree is happy with. Also updated the github workflows to run against JNI 1.8 and JNI 1.6. They are done in sets of at_most and at_least, as rust features are meant to be additive.

Will fail to compile if jni_at_most_1_6 and jni_at_least_1_8 is requested, which is normal and expected.

@ekureina
Copy link
Contributor Author

Do we want to have separate runs in the matrix for each JNI version?

@ekureina
Copy link
Contributor Author

Do we want to have separate runs in the matrix for each JNI version?

Per Zulip discussion, yes. Also, we should simplify this down considerably.

Currently, can pick between JNI 1.6 or 1.8. Resolves to one JNI version.

Will fail to compile if users ask for conflicting JNI versions, but will
try and resolve to a JNI version that everyone in the compile tree is
happy with. Also updated the github workflows to run against JNI 1.8
and JNI 1.6. They are done in sets of `at_most` and `at_least`, as rust
features are meant to be additive.

Will fail to compile if `jni_at_most_1_6` and `jni_at_least_1_8` is
requested, which is normal and expected.
Allows for pinning the JNI version. Should only be used in exact cases,
as this will block off other crates in the tree wanting to use other
versions, if they are compatible. Used in the tests, because the tests
are there to test that the JNI versions still function correctly.
No need for complicated `at_least` or `at_most`, as that usually isn't
something that comes up.

Default JNI to 1.6 on Android, and 1.8 for all other targets, but only
have a feature for each JNI version. Duchess will take the highest
version specified in the features, but fail out if not 1.6 in Android
(as Android does not support JNI > 1.6 at time of commit). This fail is
a compile error.

JNI version is now a matrix option in the Rust build workflow.
This runs on every commit and PR.
@nikomatsakis nikomatsakis merged commit a094fa2 into duchess-rs:main Jul 19, 2024
13 checks passed
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