MYNEWT-557 Warning override of undefined settings
Added support to newt build command to print out warning message for override 
of undefined settings.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/efe36b3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/efe36b3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/efe36b3a

Branch: refs/heads/master
Commit: efe36b3aaaab7a9c742c1b023d7ac01ae68b8142
Parents: ec61f09
Author: cwanda <wa...@happycity.com>
Authored: Fri Feb 3 16:45:58 2017 -0800
Committer: cwanda <wa...@happycity.com>
Committed: Thu Feb 16 20:44:06 2017 -0800

----------------------------------------------------------------------
 newt/builder/targetbuild.go | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/efe36b3a/newt/builder/targetbuild.go
----------------------------------------------------------------------
diff --git a/newt/builder/targetbuild.go b/newt/builder/targetbuild.go
index 64710db..b8ac724 100644
--- a/newt/builder/targetbuild.go
+++ b/newt/builder/targetbuild.go
@@ -188,6 +188,13 @@ func (t *TargetBuilder) validateAndWriteCfg() error {
                return util.NewNewtError(errText)
        }
 
+       warningText := strings.TrimSpace(t.res.WarningText())
+       if warningText != "" {
+               for _, line := range strings.Split(warningText, "\n") {
+                       log.Warn(line)
+               }
+       }
+
        if err := syscfg.EnsureWritten(t.res.Cfg,
                GeneratedIncludeDir(t.target.Name())); err != nil {
 

Reply via email to