gitgabrio commented on code in PR #5665:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5665#discussion_r1466383021


##########
kie-dmn/kie-dmn-validation-bootstrap/src/main/java/org/kie/dmn/validation/bootstrap/GenerateModel.java:
##########
@@ -63,10 +64,15 @@ public void generate() throws IOException {
         KieServices ks = KieServices.Factory.get();
         final KieBuilderImpl kieBuilder = (KieBuilderImpl) 
ks.newKieBuilder(kieDmnValidationBaseDir);
 
-        kieBuilder.buildAll(ValidationBootstrapProject::new,
-                            s -> !s.contains("src/test/java") && 
!s.contains("src\\test\\java") &&
-                                 !s.contains("DMNValidator") && // <- to break 
circularity which is only caused by the KieBuilder trying to early compile 
everything by itself  
-                                 !s.contains("dtanalysis"));
+        
System.setProperty(ReproducibleExecutableModelGenerationOption.PROPERTY_NAME, 
"true");

Review Comment:
   @mariofusco 
   Could you please set that property in the pom itself, instead of this class? 
This property is not relevant for that specific class, but for the module as a 
whole (even if _currently_ is used only there)



##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/PackageModel.java:
##########
@@ -233,10 +234,21 @@ public static void 
initPackageModel(TypeDeclarationContext typeDeclarationContex
      * @param packageName
      * @return
      */
-    public static String getPkgUUID(ReleaseId releaseId, String packageName) {
+    public static String getPkgUUID(KnowledgeBuilderConfigurationImpl 
configuration, ReleaseId releaseId, String packageName) {
+        if (isReproducibleExecutableModelGeneration(configuration)) {
+            return StringUtils.getPkgUUID(releaseId != null ? 
releaseId.toString() : "", packageName);

Review Comment:
   @mariofusco 
   Why we do not use always that snippet ? If it is possible to avoid 
"randomness" somehow, I think we should always do, regardless of 
"reproduciblebuild" flag.
   If, on he other side, that snippet is potentially unsafe in some context, we 
should not add it at all IMO



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to