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

Any Plans to Support Java Modules? #2368

Open
SentryMan opened this issue May 31, 2023 · 14 comments · May be fixed by #2453
Open

Any Plans to Support Java Modules? #2368

SentryMan opened this issue May 31, 2023 · 14 comments · May be fixed by #2453

Comments

@SentryMan
Copy link

I'd be great if JDBI supplied full Java module descriptors. This would allow modular project to create application images, as jlink only support explicit module-infos.

If you're worried about Java 8 support, It's possible to keep bytecode baseline compatible with Java 8 while providing a full module descriptor thanks to ModiTect.

@hgschmie
Copy link
Contributor

Hi @SentryMan,

Thank you for opening an issue with the Jdbi project. We have basic module support with Automatic-Module-Name. This is the first time that the request came up to do full module support, there is no good reason not to do it besides priorities, required time and user demand.

We don't really worry about Java 8 support; we put that on notice a long time ago so moving past Java 8 will happen at some point.

@SentryMan
Copy link
Author

The 3.39.x series of releases will be the last ones to support JDK 8.

Module time?

@stevenschlansker
Copy link
Member

We would love to have module support - if you want to hack on it and start helping the project move to full module support, we'd definitely be here to help. The maintainers are interested in this feature but it's not something we're actively working on right now.

@SentryMan
Copy link
Author

Alrighty then, I can add the modules if the build is using JDK 11

@SentryMan
Copy link
Author

SentryMan commented Aug 3, 2023

I tried to give it a go but it seems I can't run the unchanged project tests on my local. Getting a ton of errors like these.

[ERROR]   BeanMapperMockTest.shouldSetValuesOnPublicSetter:154 ╗ WrongMethodType expected (Object,Object)void but found (Object,Object)Object

@stevenschlansker
Copy link
Member

Hi @SentryMan , do you use Eclipse? I have seen this too, I suspect it is an ecj bug :( but have not spent the time to report it yet.

For now, you can just skip those failing tests, although we should definitely figure out what is going wrong.

@stevenschlansker
Copy link
Member

Alternately, a make install (or similar goal, see make help) with Eclipse automatic incremental builds disabled should work.

@SentryMan
Copy link
Author

SentryMan commented Aug 3, 2023

was running make run-tests from the command line only

@stevenschlansker
Copy link
Member

I think run-tests does not recompile the code, so you probably use already-broken compiled classes rather than making new ones. Can you please share your compiler versions and configuration (including IDE?)

@SentryMan
Copy link
Author

Apache Maven 3.9.1
Java version: 20, vendor: Amazon.com Inc.,

also yes I do use eclipse

@SentryMan
Copy link
Author

figured it out, nvm

@stevenschlansker
Copy link
Member

I will try to create a test case to submit to Eclipse to hope it gets fixed eventually.

@SentryMan
Copy link
Author

SentryMan commented Aug 3, 2023

so the only question I have then is what ServiceLoader interfaces do you guys use?

@SentryMan SentryMan linked a pull request Aug 3, 2023 that will close this issue
@stevenschlansker
Copy link
Member

I think JdbiPlugin is the only one.

Also, I filed: eclipse-jdt/eclipse.jdt.core#1267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants