gnodet opened a new pull request, #23060:
URL: https://github.com/apache/camel/pull/23060

   Follow-up to #23041 which disabled OpenRewrite entirely because it 
quadrupled CI build times.
   
   This re-enables OpenRewrite conditionally: `regen.sh` now greps the diff for 
fully qualified class name patterns and only adds `-Prewrite` when FQCNs are 
detected. Most builds (dependency bumps, doc changes, code without FQCNs) skip 
it entirely.
   
   ## How it works
   
   Before the build, the script:
   1. Determines the diff base (`origin/$GITHUB_BASE_REF` for PRs, `HEAD~1` for 
main builds)
   2. Scans added lines in `.java` files (excluding generated, imports, 
packages, comments)
   3. If any FQCN pattern is found (e.g. `java.util.List`, 
`org.apache.camel.Exchange`), appends `-Prewrite` to `MAVEN_EXTRA_ARGS`
   4. The existing `mvn install` picks it up — no separate build pass needed
   
   ## Test plan
   
   - [x] Tested regex locally: correctly detects FQCNs in commits that have 
them (e.g. `fc36fa3`)
   - [x] Correctly skips commits without FQCNs (e.g. `041bd06`, `cf44fe3`)
   - [x] Import/package/comment lines are filtered out (no false triggers)
   - [x] String literals containing FQCNs are harmless false positives 
(OpenRewrite runs but finds nothing to change)
   - [ ] Verify CI passes with this change


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to