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/08/20 19:18:55 UTC
[GitHub] [daffodil] stevedlawrence commented on pull request #625: [RFC] Remove the outputValueCalc CompiledExpression from ElementRuntimeData
stevedlawrence commented on pull request #625:
URL: https://github.com/apache/daffodil/pull/625#issuecomment-902904505
Note that I marked this as [RFC] because I'm not sure if this is the right fix. A comment I came across implies that the expected behavior is that if a global element is not referenced anywhere, then we should treat it as if it could be a root, and thus if it has any expressions that reach past that potential root then it is an error. If an element is referenced, then we don't place the same restrictions, and we allow things like expressions that go past the local root.
My guess (though not confirmed) is that the json schema where this bug was discovered has a unused global group defintion that contain elements with expression that went outside of that group def. And since the group wasn't used anywhere, we treated it like a potential root element (even though it's inside a group) and didn't allow those expressions.
Thougg, one could argue that this isn't correct, and we shouldn't assume an element could be a root until it's actually used as a root. This change seems to have that behavior. I still think this is a good change to have, and if we want the mentioned behavior then we need some other change to treat unreferenced elements as roots, as right now I think it's only enforcing OVC correctness.
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org