-
Notifications
You must be signed in to change notification settings - Fork 208
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
feat: Upgrade to Java 11 and module system #1166
base: main
Are you sure you want to change the base?
Conversation
Make Playwright finally easy to use in modular projects
Signed-off-by: Alessadro Parisi <[email protected]>
According to your comment from the original PR it will break Java 8 clients. According to the JetBrains' survay most of the people are still on Java 8, we cannot break them at the moment. We need to find a way to add module support without breaking existing clients. |
According to the lastest JetBrains Statistics Java 8 is still predominant but its usage is rapidly decreasing in favor of JDK 11 and 17 I'd also like to find a way to add modules support because currently it's almost impossible to use Playwright in such projects. The first solution that comes to my mind would be to have a separate artifact for JDK11+, but from a "maintaining" perspective I don't know how much feasible it is |
Hi, I would add some points that I find interesting on this topic
|
It's possible to have both, module descriptors and compatibility with Java SE 8, by using multi-release JARs: you compile all sources with Java SE 8 and compile the module descriptors with Java SE 9+. See e.g. slf4j's configuration and the module descriptor for slf4j-api (note that it's under |
Until this gets resolved properly, can we perhaps add a Without an explicit name, the compiler will warn when attempting to use this library. That manifest entry is safe and you can also reserve the module name for this project. E.g. <configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>playwright.driver.bundle</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration> |
Hi, just to chime in: You can still support Java 8 while providing Java 9 modules without Multi-Release JARs by using the Moditect Maven Plugin. |
Make Playwright finally easy to use in modular projects
This will also require the update of workflows to use at least JDK11
@Yuri-S This PR is the right one, fixes the one I closed #1165