Skip to content

Support JDK FFM #1131

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

Closed
jvalkeal opened this issue Aug 27, 2024 · 1 comment
Closed

Support JDK FFM #1131

jvalkeal opened this issue Aug 27, 2024 · 1 comment
Labels
type/enhancement Is an enhancement request
Milestone

Comments

@jvalkeal
Copy link
Contributor

With JDK22 a Foreign Function and Memory API came out from a preview which is supposed to be a replacement for JNI which we heavily rely via JLine as that's only way to have better terminal features. JLine's terminal provider system has a support for FFM together with JNI/JNA which are more or less deprecated to get removed at some time in a future.

Spring Shell will always follow JDK baseline(JDK17) from boot/framework but order to add FFM support we need to start compiling some new modules with JDK22+.

Up until JDK25(next LTS) we need to be a relatively aggressive to use latest JDK(22,23,24) or at least we could not fall behind what JLine uses for its FFM parts.

This issue tracks work for this particular use case.

@jvalkeal jvalkeal added the type/enhancement Is an enhancement request label Aug 27, 2024
jvalkeal added a commit to jvalkeal/spring-shell that referenced this issue Aug 30, 2024
- Starter for jline ffm terminal provider
- Build changes for compiling with gradle toolchains
  defaulting to jdk22
- spring-shell-sample-ffm which compiles with jdk22
- ci workflow setups jdk 17/22
- Relates spring-projects#1131
@jvalkeal jvalkeal added this to the 3.4.0-M2 milestone Aug 30, 2024
@jvalkeal
Copy link
Contributor Author

#1132 changed how javadocs are generated as at some point we also need to handle that via toolchain and it was difficult if aggregated javadocs are in a root project(we can't change main jdk).

jvalkeal added a commit to jvalkeal/spring-shell that referenced this issue Aug 30, 2024
- Change toolchain to get configured immediately instead
  after project evaluation which somehow caused i.e.
  vscode not detect correct project jdk in use.
- Relates spring-projects#1131
jvalkeal added a commit that referenced this issue Sep 14, 2024
jvalkeal added a commit that referenced this issue Sep 15, 2024
- To prepare jdk17+ code, don't fail if there's
  more recent javadoc format.
- Relates #1131
jvalkeal added a commit that referenced this issue Sep 15, 2024
- Prepare build so that we can use JUnit tags and
  define shellIncludeTags/shellExcludeTags from
  command line to override settings.
- Needed for some of a new planned tests which
  would not work without full build.
- Relates #1131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Is an enhancement request
Projects
None yet
Development

No branches or pull requests

1 participant