You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "dweiss (via GitHub)" <gi...@apache.org> on 2026/09/01 16:37:24 UTC

[PR] Build infra modernization (backport) [lucene]

dweiss opened a new pull request, #16592:
URL: https://github.com/apache/lucene/pull/16592

   This is a backport of gradle build-infra modernization from main. I've let the LLM rip through the changes/ updates done on main and implement the bits that have been dropped.
   
   I'll review this manually but overall it already looks very good to me and closes the discrepancy between 10x and main. I know we plan to close 10x soon but I think it may still be worth it. 
   
   I'm leaving this in draft state for now but will keep returning to it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Build infra modernization (backport) [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss merged PR #16592:
URL: https://github.com/apache/lucene/pull/16592


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Build infra modernization (backport) [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #16592:
URL: https://github.com/apache/lucene/pull/16592#issuecomment-5536747308

   Thank you, Robert. It is a large patch and I took a lot of manual steps to review it manually in some logical parts - mostly by diffing corresponding fragments against main, where we know it works, but also by testing the final output (distribution zip) for regressions. Even though the code is mostly ported with an LLM, I am confident it is a good set of changes and it works fine.
   
   I will merge tonight if there are no other voices against it.
   
   There are some follow ups we could do then which would be smaller - ICU upgrades, snowball, etc. don't know if they should land on 10x for back compat reasons but this patch makes it definitely easier to backpprt them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Build infra modernization (backport) [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #16592:
URL: https://github.com/apache/lucene/pull/16592#issuecomment-5523818653

   So, this aligns the build system and code linters with what we have on main, which is much easier to
   live with, I think.
   
   The headline change: the branch moves from Gradle 8.14 to 9.7.0, with main's
   Java convention-plugin architecture (`build-tools/build-infra`) replacing the old gradle scripts.
   
   There are changes to build-side tooling (error-prone, formatting). These introduced minor
   cleanups across the source code but they're harmless.
   
   I've gone through the diff and also compared the corresponding sections (gradle scripts, python
   scripts) against main.
   
   # Some structural changes
   
   * help files converted to markdown (from main).
   * certain tasks have been renamed (again, to correspond to those on main); regeneration checksum
     files renamed accordingly.
   * project version changed location to build-options.properties (like in main).
   
   # dev-tools/scripts
   
   Nearly all of it has been converted to what's on main, with three branch-specific retentions:
   `BASE_JAVA_VERSION=21` in the smoke tester, `-Ptests.useSecurityManager=false` in
   `addBackcompatIndexes.py`, and the CI workflows keeping their JDK 21 matrices.
   
   I've compared the distribution ZIPs before and after the change. Differences are minor: datestamps/git revision, class diffs where suppress annotations or comments were added, a handful of changes from the ported error-prone fixes, minor differences in javadocs. The published Maven poms declare exactly the same
   dependencies and versions as before the migration - this can be fixed as a follow-up if we choose to.
   
   # Deliberate differences to main
   
   Tests stay on junit4. Main runs its junit4 tests through the JUnit Platform's vintage engine but for backward
   compatibility (and complications from using a security manager), I opted to keep the tests running
   via junit4 only (this affects backports but only in a minor way).
   
   TestsAndRandomizationPlugin has some non-trivial changes - security manager support among them, but also
   assertions are always enabled (some tests rely on them; this has been fixed on main and can be a follow-up).
   
   ```
   -            project.provider(
   -                () -> {
   -                  // Run with assertions for ~75% of all seeds.
   -                  return new Random(buildGlobals.getProjectSeedAsLong().get()).nextInt(100) > 25;
   -                }));
   +            // On this branch, always run with assertions by default (main randomizes this
   +            // but the tests on this branch predate fixes required for no-asserts runs.)
   +            true);
   ```
   
   ExtractJdkApis is (llm) rewritten on top of asm to work with Java 21+:
   
   ```
    /**
   - * Extract API stubs from future JDK versions. This class must not have any dependencies outside the
   - * standard library.
   + * Extract API stubs from future JDK versions. Uses ASM because the running JDK (which matches the
   + * extracted JDK version on the 10x branch) may not have the classfile API (Java 24+) available.
     */
    public final class ExtractJdkApis {
   ```
   
   Deliberately not ported is prek and eclint. They would require some more changes to sources and I didn't think
   this matters to this patch.
   
   # Validation
   
   All tests pass. I also ran `regenerate --rerun-tasks` so some generated files have changed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org