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


##########
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala:
##########
@@ -904,6 +900,7 @@ abstract class TestCase(testCaseXML: NodeSeq, val parent: 
DFDLTestSuite) {
 
       val useSerializedProcessor =
         if (validationMode == ValidationMode.Full) false
+        else if (defaultValidationMode == ValidationMode.Full) false

Review Comment:
   Hmm, good question...
   
   We definitely need to set useSerializedParser to false if 
defaultValidationMode is full, since we use defaultValidationMode to compile 
the DataProcessor that is added to the TDML cache. If we didn't disable 
serializedProcessor for that compilation then we would lose the ability to to 
full validation.
   
   But if validationMode is Off, in theory we could still use a 
serializedProcessor. But then we would either need to  ignore the cached 
version and recompile the schema with useSerializedProcessor=true (probably too 
slow to recompile), or get the cached version and save/reload it. The latter 
would work fine but we would need a new function in the TDMLDFDLProcessor API 
that accepts a previous compile result, saves/reloads it, and then returns it. 
We could add a new API do support that, but I'm not sure it's worth the effort 
and extra complication. Especially since it's probably fairly rare to set 
defaultValdiation to true but disable it for individual tests. I think for now 
it's easier to just say if anything uses validation, we disable serialization.
   
   Maybe If we start running into problems where we aren't sufficiently testing 
save/reloaded processors and start seeing regressions one of the above changes 
is probably worth considering. Or really what we would probably want to do is 
figure out how to fix DAFFODIL-1749 so that we can serialize parsers with full 
validation mode. Then we can remove this useSerializedProcessor stuff 
completely.



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