You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/06/13 17:06:23 UTC
[GitHub] [incubator-daffodil] stevedlawrence opened a new pull request #233:
Warn when DFDL properties are ignored
stevedlawrence opened a new pull request #233: Warn when DFDL properties are ignored
URL: https://github.com/apache/incubator-daffodil/pull/233
During schema compilation, a cache of properties exists to speed up
subsequent property lookups. This patch takes advantage of that cache to
determine which properties have been used or not. At the end of schema
compilation, we now inspect all Terms and look for any properties that
are defined on each Term but are not in the cache, which implies that a
property was not used and we can create an SDW. These warnings should
help schema developers realize when properties are accidentally ignored
(e.g. dfdl:lengthPattern is dfdl:lengthKind is not "pattern").
Additionally, code was refactored to property lookup functions to ensure
properties are always cached. Some parts of the code would skip caching
if it used findPropertyOption or other functions instead of
cachePropertyOption. To avoid accidentally not adding a lookup to the
cache, the cache* functions are removed, the findPropertyOption always
caches, and all property lookups are changed to use this function or a
wrapper.
Also modify all tests to remove all unused properties.
DAFFODIL-1619
----------------------------------------------------------------
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
With regards,
Apache Git Services