Skip to content

Having a project with preview enabled but not set to the latest Java version silently fails to build #3846

Description

@datho7561

Consider an Eclipse project (can be an "unmanaged" Eclipse project where the .classpath, .project, and .settings are in the same folder as the source code, or an "invisible" project where they are generated by the language server and stored elsewhere) with the follow .settings/org.eclipse.jdt.core.prefs:

eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=25
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=25
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=25
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning

Given preview features are enabled, but the latest Java version isn't being used, I expect a warning or error to be presented somewhere. However, I don't see a warning or error anywhere. The project doesn't build as a result, but this isn't reported anywhere and I only figured out it wasn't building by opening it in Eclipse or checking the contents of the output folder.

It seems this was supposed to be fixed in #3137 by presenting some sort of notification in the IDE, but I don't see it anywhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions