From 28f242e6850c73b99686b4a539da7834355c127e Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 4 May 2016 12:22:41 +0200 Subject: [PATCH] Dependency parsing: if a file is not found trigger a full rebuild The missing file is probably due to a parsing error, better to trigger a rebuild in this case instead of exiting with an error. This is a quick workaround, the full solution is to properly parse .d files. Fix #136 Signed-off-by: Cristian Maglie --- src/arduino.cc/builder/builder_utils/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arduino.cc/builder/builder_utils/utils.go b/src/arduino.cc/builder/builder_utils/utils.go index af5aabdc..17c04fca 100644 --- a/src/arduino.cc/builder/builder_utils/utils.go +++ b/src/arduino.cc/builder/builder_utils/utils.go @@ -222,7 +222,9 @@ func ObjFileIsUpToDate(sourceFile, objectFile, dependencyFile string) (bool, err for _, row := range rows { depStat, err := os.Stat(row) if err != nil && !os.IsNotExist(err) { - return false, i18n.WrapError(err) + // There is probably a parsing error of the dep file + // Ignore the error and trigger a full rebuild anyway + return false, nil } if os.IsNotExist(err) { return false, nil