You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2020/11/10 13:49:00 UTC

[jira] [Created] (DAFFODIL-2432) Need validation of tunable values

Steve Lawrence created DAFFODIL-2432:
----------------------------------------

             Summary: Need validation of tunable values
                 Key: DAFFODIL-2432
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2432
             Project: Daffodil
          Issue Type: Bug
          Components: API
            Reporter: Steve Lawrence


The TunableGenerator.scala file use the dafext.xsd file to generate code to parse tunables. This handles things like correctly converting types or handling default values. Unfortunately, it only does type validation, nothing about value validation (e.g. value must be positive). This means we must either add custom validation code for tunable values long after they have been set, which can possibly lead to confusion, or we don't do any validation at all, which can lead to undefined behavior.

Instead, we should add xs:restriction's to the tunables list in dafext.xsd, and have the TunableGenerator create code to validate based on these restrictions. We don't necessarily need to support all XSD restrictions--probably min/maxInclusive is suffiicient.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)