[ 
https://issues.apache.org/jira/browse/MYNEWT-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15840134#comment-15840134
 ] 

ASF subversion and git services commented on MYNEWT-556:
--------------------------------------------------------

Commit 962ae740a90d25780a86bc3d12ede46196c99426 in incubator-mynewt-newt's 
branch refs/heads/develop from [~cwanda]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-newt.git;h=962ae74 
]

MYNEWT-556 Supports detection of Priority Violation

3 factors contributed to newt ignoring the override silenty.
1) The code only checked for Lateral override
2) The code processed syscfg.defs and syscfg.vals by package priority
   (lowest first) So when a package overrides the setting of higher
   priority the setting definition has not been processed yet, and was treated 
as
   overriding an undefined setting, which is treated as a warning.
3) newt build did not print out warning message for overriding an undefined 
setting (See MYNEWT-557)

Fix involves:
1) Process  all the syscfg.defs for all package first. Then process the 
syscfg.vals for each package.
2) Save the package that defined the setting in CfgEntry
3) Create CfgPriority to save priority violation: setting name, package that 
defined the setting,
   and package that override the setting.
4) Reordered PackageType definition by package priority (in increasing order of 
priority). Also reoreded
   PackageTypeNames to match order of PackageType definition (not functionally 
needed)
5) Compare priority types between the package overriding the value and the 
package defining the setting.
   to detect prioirty violations. Newt aborts the build.


> The newt tool does not generate an error for priority violations of 
> configuration setting overrides
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MYNEWT-556
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-556
>             Project: Mynewt
>          Issue Type: Bug
>          Components: Newt
>    Affects Versions: v1_0_0_beta1
>            Reporter: Wanda Chiu
>            Assignee: Wanda Chiu
>             Fix For: v1_0_0_rel
>
>
> When a package of the same or lower priority package overrides a setting 
> defined by a higher priority package, newt silently ignores the overrides. 
> Newt should generate a priority violation error. 
> newt only checks for Lateral violations (lib packages overriding a setting 
> defined by another lib packages). This is a special case of priority 
> violation and should be treated as a priority violation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to