You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/05/06 15:09:04 UTC

[GitHub] [daffodil] mbeckerle commented on a change in pull request #444: WIP: Use AbsentRep instead of MissingSeparator

mbeckerle commented on a change in pull request #444:
URL: https://github.com/apache/daffodil/pull/444#discussion_r627508756



##########
File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/SequenceParserBases.scala
##########
@@ -272,6 +277,10 @@ abstract class SequenceParserBase(
               // the sequence succesfully
               isDone = true
               pstate.setSuccess()
+              // If we're masking the failure, we don't want the error dianostics
+              // to flow up. Restore the diagnostics from before the parse
+              // attempt
+              pstate.diagnostics = diagnosticsBeforeAttempt

Review comment:
       One thought is we should split this into two issues. 
   
   One is the fact that diagnostics are being created and retained despite backtracking, and that one is important to fix. 
   
   The other is a bug with unordered sequences, and the importance of that may not be as high - depends on whether there are DFDL Schemas depending on it and are broken by this. 
   
   VCard is the only published DFDL schema I can find that uses unordered sequences.
   
   An unordered sequence is a lot like an array of choice, but yeah, my guess based on your note above is we can't directly reuse choice parser, but must make a variant of it (sharing traits/bases perhaps) that has somewhat different behavior for discriminators since logically an unordered sequence does not have two nested PoUs, just one per child element instance. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org