]> Cypherpunks.ru repositories - goredo.git/blobdiff - buildlog.go
Redundant @documentencoding
[goredo.git] / buildlog.go
index 3403e4d750d051a191bfaba0ecd88f31b74c64f8..a260867e8a5a7770fd830833fb2f6bcdcb7a8302 100644 (file)
@@ -1,6 +1,6 @@
 /*
 goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -76,7 +76,7 @@ func init() {
 }
 
 func parseBuildLogRec(dir, tgt string) (map[string][]string, error) {
-       fd, err := os.Open(path.Join(dir, RedoDir, tgt+LogSuffix+DepSuffix))
+       fd, err := os.Open(path.Join(dir, RedoDir, tgt+LogRecSuffix))
        if err != nil {
                return nil, err
        }
@@ -200,18 +200,9 @@ func showBuildLog(dir, tgt string, buildLogRec map[string][]string, depth int) e
                return w.Flush()
        }
        defer fd.Close()
-       fdDep, err := os.Open(path.Join(dirNormalized, RedoDir, tgtNormalized+DepSuffix))
-       if err != nil {
-               return err
-       }
-       depInfo, err := depRead(fdDep)
-       fdDep.Close()
-       if err != nil {
-               return err
-       }
-       subs := make([]*BuildLogJob, 0, len(depInfo.ifchanges))
-       for _, dep := range depInfo.ifchanges {
-               subDir, subTgt := cwdAndTgt(path.Join(dirNormalized, dep["Target"]))
+       subs := make([]*BuildLogJob, 0, len(buildLogRec["Ifchange"]))
+       for _, dep := range buildLogRec["Ifchange"] {
+               subDir, subTgt := cwdAndTgt(path.Join(dirNormalized, dep))
                if subDir == dirNormalized && subTgt == tgtNormalized {
                        continue
                }
@@ -238,7 +229,7 @@ func showBuildLog(dir, tgt string, buildLogRec map[string][]string, depth int) e
                }
                subs = append(subs, &BuildLogJob{
                        dir:      dirNormalized,
-                       tgt:      dep["Target"],
+                       tgt:      dep,
                        started:  started,
                        exitCode: exitCode,
                        rec:      rec,