stevedlawrence commented on code in PR #812:
URL: https://github.com/apache/daffodil/pull/812#discussion_r927901676


##########
daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala:
##########
@@ -879,6 +882,12 @@ object Main {
             var keepParsing = true
             var exitCode = ExitCode.Success
 
+            if (parseOpts.stream.toOption.getOrElse(false) && (infosetType == 
InfosetType.EXI)) {
+              exitCode = ExitCode.NotYetImplemented
+              keepParsing = false
+              System.err.println("Streaming mode with EXI infosets is not 
currently supported")
+            }

Review Comment:
   This only errors when parsing. Streaming can also be enabled for unparsing 
so we should detect that too.
   
   Also, maybe a cleaner way to check the options is using scallops 
`validateOpt` function, I think something like this:
   
   ```scala
   validateOpt(infosetType, stream) {
     case (Some(InfosetType.EXI), Some(true)) => Left("Error message here ... ")
     case _ => Right(Unit)
   }
   ```
   
   We use something similar a few places in the scallop configuration.



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