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

Adjust to JavaCore.defaultRootModules deprecation #1958

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

akurtakov
Copy link
Contributor

Use the new method that filters based on the release. If release option is not set, use target and if it's not there too use the latest version.

Use the new method that filters based on the release. If release option
is not set, use target and if it's not there too use the latest version.
@akurtakov
Copy link
Contributor Author

@stephan-herrmann As this is continuation of eclipse-jdt/eclipse.jdt.core#2786 (in a way), would you please review?

@akurtakov akurtakov merged commit c3f2219 into eclipse-jdt:master Jan 24, 2025
10 checks passed
@stephan-herrmann
Copy link
Contributor

@stephan-herrmann As this is continuation of eclipse-jdt/eclipse.jdt.core#2786 (in a way), would you please review?

Sorry for the delay.

Strictly speaking, https://bugs.openjdk.org/browse/JDK-8205169 specifies that the old behavior should be retained only when using --release:

At compile-time, the JDK 9/10 policy for root modules will still be used when targeting 9 and 10 with --release.

So, in jdt.core I use this idiom:

	String release = JavaCore.ENABLED.equals(getOption(JavaCore.COMPILER_RELEASE, true))
					? getOption(JavaCore.COMPILER_COMPLIANCE, true) : null;

But the change has another problem: option COMPILER_RELEASE has values ENABLED|DISABLED, which are not proper values for JavaCore.defaultRootModules()

@akurtakov
Copy link
Contributor Author

Ah, I missed that . New PR is in the prep.

akurtakov added a commit to akurtakov/eclipse.jdt.ui that referenced this pull request Jan 24, 2025
Fixes broken commit c3f2219 .
Fixed approach used here given in
eclipse-jdt#1958 (comment)
akurtakov added a commit to akurtakov/eclipse.jdt.ui that referenced this pull request Jan 24, 2025
Fixes broken commit c3f2219 .
Fixed approach used here given in
eclipse-jdt#1958 (comment)
akurtakov added a commit that referenced this pull request Jan 24, 2025
Fixes broken commit c3f2219 .
Fixed approach used here given in
#1958 (comment)
@stephan-herrmann
Copy link
Contributor

Ah, I missed that . New PR is in the prep.

thanks

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