Skip to content

Commit 28f242e

Browse files
committed
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 <[email protected]>
1 parent 9157be6 commit 28f242e

File tree

1 file changed

+3
-1
lines changed
  • src/arduino.cc/builder/builder_utils

1 file changed

+3
-1
lines changed

Diff for: src/arduino.cc/builder/builder_utils/utils.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ func ObjFileIsUpToDate(sourceFile, objectFile, dependencyFile string) (bool, err
222222
for _, row := range rows {
223223
depStat, err := os.Stat(row)
224224
if err != nil && !os.IsNotExist(err) {
225-
return false, i18n.WrapError(err)
225+
// There is probably a parsing error of the dep file
226+
// Ignore the error and trigger a full rebuild anyway
227+
return false, nil
226228
}
227229
if os.IsNotExist(err) {
228230
return false, nil

0 commit comments

Comments
 (0)