Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cae59be

Browse files
committed
Increased logging during compile
1 parent 812e621 commit cae59be

File tree

1 file changed

+9
-4
lines changed
  • internal/arduino/builder/internal/utils

1 file changed

+9
-4
lines changed

‎internal/arduino/builder/internal/utils/utils.go‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,36 @@ import (
3232
func ObjFileIsUpToDate(sourceFile, objectFile, dependencyFile *paths.Path) (bool, error) {
3333
logrus.Debugf("Checking previous results for %v (result = %v, dep = %v)", sourceFile, objectFile, dependencyFile)
3434
if objectFile == nil || dependencyFile == nil {
35-
logrus.Debugf("Not found: nil")
35+
logrus.Debugf("Object file or dependency file not provided")
3636
return false, nil
3737
}
3838

3939
sourceFile = sourceFile.Clean()
4040
sourceFileStat, err := sourceFile.Stat()
4141
if err != nil {
42+
logrus.Debugf("Could not stat source file: %s", err)
4243
return false, err
4344
}
4445

4546
objectFile = objectFile.Clean()
4647
objectFileStat, err := objectFile.Stat()
4748
if err != nil {
4849
if os.IsNotExist(err) {
49-
logrus.Debugf("Not found: %v", objectFile)
50+
logrus.Debugf("Object file not found: %v", objectFile)
5051
return false, nil
5152
}
53+
logrus.Debugf("Could not stat object file: %s", err)
5254
return false, err
5355
}
5456

5557
dependencyFile = dependencyFile.Clean()
5658
dependencyFileStat, err := dependencyFile.Stat()
5759
if err != nil {
5860
if os.IsNotExist(err) {
59-
logrus.Debugf("Not found: %v", dependencyFile)
61+
logrus.Debugf("Dependency file not found: %v", dependencyFile)
6062
return false, nil
6163
}
64+
logrus.Debugf("Could not stat dependency file: %s", err)
6265
return false, err
6366
}
6467

@@ -73,6 +76,7 @@ func ObjFileIsUpToDate(sourceFile, objectFile, dependencyFile *paths.Path) (bool
7376

7477
rows, err := dependencyFile.ReadFileAsLines()
7578
if err != nil {
79+
logrus.Debugf("Could not read dependency file: %s", dependencyFile)
7680
return false, err
7781
}
7882

@@ -92,7 +96,7 @@ func ObjFileIsUpToDate(sourceFile, objectFile, dependencyFile *paths.Path) (bool
9296
}
9397
objFileInDepFile := firstRow[:len(firstRow)-1]
9498
if objFileInDepFile != objectFile.String() {
95-
logrus.Debugf("Depfile is about different file: %v", objFileInDepFile)
99+
logrus.Debugf("Depfile is about different object file: %v", objFileInDepFile)
96100
return false, nil
97101
}
98102

@@ -103,6 +107,7 @@ func ObjFileIsUpToDate(sourceFile, objectFile, dependencyFile *paths.Path) (bool
103107
// If we don't do this check it might happen that trying to compile a source file
104108
// that has the same name but a different path wouldn't recreate the object file.
105109
if sourceFile.String() != strings.Trim(rows[1], " ") {
110+
logrus.Debugf("Depfile is about different source file: %v", strings.Trim(rows[1], " "))
106111
return false, nil
107112
}
108113

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /