In general the incubator source set uses almost same Xlint options like main 
sources. It inherits those and just adapts by removing some warnings regarding 
options of compiler itself. But all defined options are also applied for that 
source set.
Error prone also works and ecj was enabled recently (sorry for not reenabling 
it 2 years ago, was my fault).

Uwe

Am 8. Juli 2025 20:50:28 MESZ schrieb Uwe Schindler <u...@thetaphi.de>:
>It won't trigger the incubator warning because we compile against external jar 
>file. The classes are not in incubator from perspective of javac.
>
>But you can enable the incubator warning globally. This ensures we only use 
>incubator in that source set.
>
>Uwe
>
>Am 8. Juli 2025 18:59:19 MESZ schrieb Robert Muir <rcm...@gmail.com>:
>>I noticed an oddity with the linting for this code:
>>https://github.com/apache/lucene/pull/14917
>>
>>But I haven't checked if ECJ runs on it or if all -Xlint checks run
>>against it. I added "-Xlint:incubating" check (or similar) recently
>>and was surprised nothing tripped.
>>
>>Anyway it isn't a complaint, just hoping we can step up the pickiness
>>on these sources?
>>
>>On Tue, Jul 8, 2025 at 11:17 AM Uwe Schindler <u...@thetaphi.de> wrote:
>>>
>>> Hi,
>>>
>>> This is because the compilation/processing is different. The files are 
>>> compiled with a Java 24 API extract (apijar file) of the Incubator modules 
>>> and are NOT compiled against the current JDK. In addition it allows us to 
>>> make sure no classes from there appear in public APIs or can be referenced 
>>> from there. This is done because compilation with "-release" does not work 
>>> with a later JDK like 25 (as it is not part of backwards compatibility) and 
>>> the APIs may suddenly change in later Java versions. Therefore the 
>>> compilation is done using a stub: 
>>> https://github.com/apache/lucene/tree/main/lucene/core/src/generated/jdk
>>>
>>> In addition when Panama Vector enters Preview mode (should happen hopefully 
>>> soon after Java 25) we need a separate sourceset anyways.
>>>
>>> Uwe
>>>
>>> Am 08.07.2025 um 16:58 schrieb Michael Sokolov:
>>>
>>> I'm curious why we have lucene/core/src/java24 directory/module on main 
>>> branch instead of moving these classes to lucene/core/src/java, now that 
>>> JDK24 is mandatory.
>>>
>>> --
>>> Uwe Schindler
>>> Achterdiek 19, D-28357 Bremen
>>> https://www.thetaphi.de
>>> eMail: u...@thetaphi.de
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
>>For additional commands, e-mail: dev-h...@lucene.apache.org
>>
>
>--
>Uwe Schindler
>Achterdiek 19, 28357 Bremen
>https://www.thetaphi.de
--
Uwe Schindler
Achterdiek 19, 28357 Bremen
https://www.thetaphi.de

Reply via email to