X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=buildlog.go;h=cdbf6ba2ec0595f90f782d41a5cc3827293b82ce;hb=0030b3e73152bf9d9ad3e435fa42e607c7865321;hp=3403e4d750d051a191bfaba0ecd88f31b74c64f8;hpb=7492a39768035abafa55be738649a8dd035a89bd;p=goredo.git diff --git a/buildlog.go b/buildlog.go index 3403e4d..cdbf6ba 100644 --- a/buildlog.go +++ b/buildlog.go @@ -1,6 +1,6 @@ /* goredo -- djb's redo implementation on pure Go -Copyright (C) 2020-2021 Sergey Matveev +Copyright (C) 2020-2022 Sergey Matveev 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,