uschindler commented on code in PR #14939:
URL: https://github.com/apache/lucene/pull/14939#discussion_r2202531585


##########
gradle/validation/ast-grep/rules/vectors.yml:
##########
@@ -0,0 +1,38 @@
+# Special policing of vectorization sources to prevent performance traps!
+---
+# yaml-language-server: 
$schema=https://raw.githubusercontent.com/ast-grep/ast-grep/refs/heads/main/schemas/java_rule.json
+id: illegal-incubator-usage
+language: java
+ignores:
+  # the only place vector api code should sit.
+  - "**/internal/vectorization/PanamaVector{Constants,UtilSupport}.java"
+  # TODO: move this vector logic to PanamaVectorUtilSupport!
+  - "**/internal/vectorization/MemorySegmentPostingDecodingUtil.java"

Review Comment:
   this is perfectly fine and needed to be there.



##########
gradle/validation/ast-grep/rules/vectors.yml:
##########


Review Comment:
   Basically the whole chekc here is not needed. Because (as you see with 
forbiddenapis) in the main sources is imposisble because thanks to the module 
system the incubator classes are not available.
   
   So a class in normal java/main there is no risk to introduce vector classes 
(only if somebody adds jdk.incubator) to the `module-info.java`.
   
   So please remove this whole file. Thanks.



##########
lucene/core/src/java24/org/apache/lucene/internal/vectorization/MemorySegmentPostingDecodingUtil.java:
##########
@@ -36,6 +36,8 @@ final class MemorySegmentPostingDecodingUtil extends 
PostingDecodingUtil {
     this.memorySegment = memorySegment;
   }
 
+  // FIXME: move this logic to PanamaVectorUtilSupport.

Review Comment:
   I disagree here. This is in the internal/vectorization module, no need to 
move 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-unsubscr...@lucene.apache.org

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


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

Reply via email to