tuxji commented on code in PR #1122:
URL: https://github.com/apache/daffodil/pull/1122#discussion_r1409330879


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/compiler/Compiler.scala:
##########
@@ -92,13 +89,10 @@ final class ProcessorFactory private (
       validateDFDLSchemas,
       checkAllTopLevel,
       tunables,
-      Some(sset),

Review Comment:
   > Note that another side effect of this change is that if a user calls 
ProcessorFactory.getDiagnostics prior to calling isError, then no work will 
have been done and so there will be no diagnostics. This was actually the case 
with the CLI and TDML runner, hence a couple of changes in this PR. We could 
avoid this by modifying getDiagnostics to call isError before returning the 
diags.
   
   Yes, this is the only thing I would suggest changing.  A programmer might 
think pf is already initialized and call pf.getDiagnostics before calling 
pf.onPath or pf.isError.  I'd suggest that pf.getDiagnostics throw an assertion 
exception to ensure such a programming error gets fixed, instead of calling 
isError before returning the diagnostics or simply returning no diagnostics.



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