jadams-tresys commented on code in PR #1515:
URL: https://github.com/apache/daffodil/pull/1515#discussion_r2237213960


##########
daffodil-cli/src/main/scala/org/apache/daffodil/cli/Main.scala:
##########
@@ -184,21 +180,21 @@ class CLIConf(arguments: Array[String], stdout: 
PrintStream, stderr: PrintStream
 
       s match {
         case DefaultArgPattern(name, arg) if Validators.isRegistered(name) =>
-          if (doesNotSupportReloadableParsers(name)) {
-            null
+          if (Seq(".conf", ".properties").exists(arg.endsWith)) {
+            val is = new FileInputStream(arg)
+            props.load(is)

Review Comment:
   I'm not sure I understand what's going on with singleArgConverter, but if I 
understand things correctly we are expecting either a single argument that is 
the path to the properties file or there are no arguments.  I don't think we 
should check the filename extension.  Relying on filename extensions being 
correct tends to run into issues.
   
   Also is the whole properties file necessary for just specifying what 
validation we want to do?  It didn't stand out to me during my initial review 
of the API changes, but when I went to update some of my CLI Daffodil tools to 
use the new API this change made things much more complicated.  As far as I can 
tell the only thing that ever gets set in the properties file is just the path 
to the validation schema.  Are there going to be more properties in the future? 
 If not I suggest we change the API to be something like 
```Validators.get("full", pathToValidationSchema``` and 
```Validators.get("limited")```



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