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

Upgrade to JDK 22 #14

Merged
merged 2 commits into from
Mar 8, 2024
Merged

Upgrade to JDK 22 #14

merged 2 commits into from
Mar 8, 2024

Conversation

msgilligan
Copy link
Member

@msgilligan msgilligan commented Mar 7, 2024

This PR will resolve Issue #6 and Issue #9

  • Use Java Toolchains to use JDK 22 for compile/test
  • Remove --enable-preview
  • Use JDK 21 for -api and -bouncy modules (we're using a JDK 21 feature in API currently, we need to backport this to en earlier JDK version)
  • Use JDK 21 temporarily for Kotlin examples (until Kotlin supports JDK 22)
  • Use BouncySecp256k1 in the Kotlin examples (which means they won't run until Bouncy is finished) but they will at least compile.
  • Update the extract-headers.sh script to work with JDK 22 and the latest jextract
  • Update OpaqueKeyPair and Secp256k1Foreign to use the JDK 22 FFM API
  • Replace the o.b.s.f.jextract Java files with the files generated by the latest jextract.

This is WIP because the GitHub Actions build needs an update.

@msgilligan msgilligan added this to the Version 0.0.2 milestone Mar 7, 2024
@schildbach
Copy link
Member

I think if this PR is WIP it might be a good idea to use the GitHub "Draft" feature.

@msgilligan
Copy link
Member Author

I think if this PR is WIP it might be a good idea to use the GitHub "Draft" feature.

We can't use it in a private repo without paying 😕

@msgilligan msgilligan force-pushed the msgilligan/jdk22 branch 3 times, most recently from 3e689ba to b184c65 Compare March 7, 2024 17:00
@msgilligan msgilligan changed the title WIP: Upgrade to JDK 22 Upgrade to JDK 22 Mar 8, 2024
Copy link
Member

@schildbach schildbach left a comment

Choose a reason for hiding this comment

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

I would probably try to split the bouncy change off from this PR. It somehow seems unrelated.

Other than that, approved.

* Use Java Toolchains to use JDK 22 for compile/test
* Remove `--enable-preview`
* Use JDK 21 for -api and -bouncy modules (we're using a JDK 21 feature in API
  currently, we need to backport this to en earlier JDK version)
* Use JDK 21 temporarily for Kotlin examples (until Kotlin supports JDK 22)
* Use BouncySecp256k1 in the Kotlin examples (which means they won't run until Bouncy is finished) but
  they will at least compile.
* Update the extract-headers.sh script to work with JDK 22 and the latest jextract
* Update OpaqueKeyPair and Secp256k1Foreign to use the JDK 22 FFM API
* Replace the `o.b.s.f.jextract` Java files with the files generated by the latest jextract.
Copy link
Member

@schildbach schildbach left a comment

Choose a reason for hiding this comment

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

Approved. I only wonder why the jextract is under version control if it's generated as you say.

@msgilligan
Copy link
Member Author

Approved. I only wonder why the jextract is under version control if it's generated as you say.

I think the recommend use of jextract is to get your initial implementation quickly, but then to customize it and maintain it manually. I think that is the path we will pursue. (If not, we can change things to run jextract as part of the build.)

@msgilligan msgilligan merged commit 98aba4c into master Mar 8, 2024
6 checks passed
@msgilligan msgilligan deleted the msgilligan/jdk22 branch March 8, 2024 17:55
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.

None yet

2 participants