eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Validate target setting
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
In tests of jdt.debug I observed that ecj compiled classes using 24 preview features, but the class file claimed version 23 or even 1.8 (the former observed on hudson, the latter during local debugging).
It turned out that only source, compliance and preview were set.
I believe jdt.ui already checks when settings are inconsistent, but the issue in tests suggests that this is not enough. Clients invoking ecj via API are not protected, nor are users manually editing `.settings/org.eclipse.jdt.core.prefs`.
I think it's time to add validation to the compiler itself.
Contributor guide
Research direction
Start with the jdt.debug tests that exposed ecj compiling preview classes with the wrong class-file version, then inspect the existing jdt.ui checks for inconsistent source, compliance, and preview settings. Determine how compiler-level validation should cover API callers and manually edited .settings/org.eclipse.jdt.core.prefs, and add tests showing invalid combinations are handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100