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/12/02 18:21:00 UTC

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

     [ https://issues.apache.org/jira/browse/DAFFODIL-2432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence resolved DAFFODIL-2432.
--------------------------------------
    Fix Version/s: 3.1.0
       Resolution: Fixed

Fixed in commit 7867d8e0cb99ec6b09f0e1ce0791ce850642f7f2

> 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
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 3.1.0
>
>
> 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)