]> Cypherpunks.ru repositories - goredo.git/commitdiff
Change dependency files extension to .rec
authorSergey Matveev <stargrave@stargrave.org>
Fri, 29 Jan 2021 07:38:55 +0000 (10:38 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 29 Jan 2021 08:08:54 +0000 (11:08 +0300)
dep.go
doc/cmds.texi
doc/faq.texi
doc/news.texi
doc/state.texi
ood.go
run.go
t/goredo-deps.t
usage.go

diff --git a/dep.go b/dep.go
index a64da9e41cb56980fe9219e61fd5d9fbfcd0555a..bbd7310171fb5d43183e544425f5676d91fe381d 100644 (file)
--- a/dep.go
+++ b/dep.go
@@ -159,7 +159,7 @@ func depRead(fdDep *os.File) (*DepInfo, error) {
        }
        depInfo := DepInfo{}
        if b := m["Build"]; b == "" {
-               return nil, errors.New(".dep missing Build:")
+               return nil, errors.New(".rec missing Build:")
        } else {
                depInfo.build = b
        }
@@ -177,7 +177,7 @@ func depRead(fdDep *os.File) (*DepInfo, error) {
                case DepTypeIfcreate:
                        dep := m["Target"]
                        if dep == "" {
-                               return nil, errors.New("invalid format of .dep")
+                               return nil, errors.New("invalid format of .rec")
                        }
                        depInfo.ifcreates = append(depInfo.ifcreates, dep)
                case DepTypeIfchange:
@@ -186,11 +186,11 @@ func depRead(fdDep *os.File) (*DepInfo, error) {
                case DepTypeStamp:
                        hsh := m["Hash"]
                        if hsh == "" {
-                               return nil, errors.New("invalid format of .dep")
+                               return nil, errors.New("invalid format of .rec")
                        }
                        depInfo.stamp = hsh
                default:
-                       return nil, errors.New("invalid format of .dep")
+                       return nil, errors.New("invalid format of .rec")
                }
        }
        return &depInfo, nil
index 1483b7f204569cb0c43cf6b70c424bf2fc90c87b..abd09905baf2d0820745ed6224113046c7171e0b 100644 (file)
@@ -46,7 +46,7 @@ default.do
     @url{https://en.wikipedia.org/wiki/DOT_(graph_description_language), DOT}
     graph generator. For example to visualize your dependencies with GraphViz:
 @example
-$ redo target [...] # to assure that **/.redo/*.dep are filled up
+$ redo target [...] # to assure that **/.redo/*.rec are filled up
 $ redo-dot target [...] > whatever.dot
 $ dot -Tpng whatever.dot > whatever.png # possibly add -Gsplines=ortho
 @end example
index 9b909a653bcdfddeeaa4af907eedd19e51777938..16fadafa01bef6604c7be428c6a64e5d1ac8e483 100644 (file)
@@ -42,7 +42,7 @@ and transparently compressed, as ZFS with LZ4/Zstandard and
 Skein/BLAKE[23] algorithms demonstrate us.
 
 @command{goredo} includes @command{redo-stamp}, that really records the
-stamp in the @file{.dep} file, but it does not play any role later. It
+stamp in the @file{.rec} file, but it does not play any role later. It
 is stayed just for compatibility.
 
 @section Can removed .do lead to permanent errors of its non existence?
@@ -52,7 +52,7 @@ assume that @file{.do}-less target now is an ordinary source-file? I
 have no confidence in such behaviour. So it is user's decision how to
 deal with it, probably it was just his inaccuracy mistake. If you really
 want to get rid of that dependency knowledge for @file{foo/bar} target,
-then just remove @file{foo/.redo/bar.dep}.
+then just remove @file{foo/.redo/bar.rec}.
 
 @section Does redo-always always rebuilds target?
 
index 99faedaf6cc4d052aca934cfe1dff9ca1652a0e9..7f67ba9e52832621770fee1979bdf0c3ef6f5ddd 100644 (file)
@@ -1,6 +1,15 @@
 @node News
 @unnumbered News
 
+@anchor{Release 1.2.0}
+@section Release 1.2.0
+@itemize
+@item
+    Dependency files @file{.dep} extension changed to @file{.rec}, to
+    reflect its recfile format nature and editors file type better
+    determination.
+@end itemize
+
 @anchor{Release 1.1.0}
 @section Release 1.1.0
 @itemize
index fa7c28c657e74787ba76d69746eb6d848cbd4cdb..4c84b4168b812cc6d7295485bc1652c1ccd5d905 100644 (file)
@@ -3,7 +3,7 @@
 
 Dependency and build state is kept inside @file{.redo} subdirectory in
 each directory related the build. Each corresponding target has its own,
-recreated with every rebuild, @file{.dep} file. It is
+recreated with every rebuild, @file{.rec} file. It is
 @url{https://www.gnu.org/software/recutils/, recfile}, that could have
 various dependency information. For example:
 
diff --git a/ood.go b/ood.go
index 912b6c61b4ce62c5e93ba9de78a3d17fd8283eff..0552e2016112a46b037976dbfc88f26adf677b2a 100644 (file)
--- a/ood.go
+++ b/ood.go
@@ -110,11 +110,11 @@ func isOOD(cwd, tgtOrig string, level int, seen map[string]struct{}) (bool, erro
        for _, m := range depInfo.ifchanges {
                dep := m["Target"]
                if dep == "" {
-                       return ood, TgtErr{tgtOrig, errors.New("invalid format of .dep: missing Target")}
+                       return ood, TgtErr{tgtOrig, errors.New("invalid format of .rec: missing Target")}
                }
                theirInode, err := inodeFromRec(m)
                if err != nil {
-                       return ood, TgtErr{tgtOrig, fmt.Errorf("invalid format of .dep: %v", err)}
+                       return ood, TgtErr{tgtOrig, fmt.Errorf("invalid format of .rec: %v", err)}
                }
                theirHsh := m["Hash"]
                trace(CDebug, "ood: %s%s -> %s: checking", indent, tgtOrig, dep)
diff --git a/run.go b/run.go
index f6a9042d192dd9316239c99660b3db42a0b61f6d..25e8bacebf3e20e88174412a51b5e50b0a0bc688 100644 (file)
--- a/run.go
+++ b/run.go
@@ -51,7 +51,7 @@ const (
 
        RedoDir    = ".redo"
        LockSuffix = ".lock"
-       DepSuffix  = ".dep"
+       DepSuffix  = ".rec"
        TmpPrefix  = ".redo."
        LogSuffix  = ".log"
 )
@@ -204,7 +204,7 @@ func runScript(tgtOrig string, errs chan error, traced bool) error {
                        fdDep, err := os.Open(path.Join(redoDir, tgt+DepSuffix))
                        if err != nil {
                                if os.IsNotExist(err) {
-                                       err = errors.New("was not built: no .dep")
+                                       err = errors.New("was not built: no .rec")
                                }
                                goto Finish
                        }
@@ -240,7 +240,7 @@ func runScript(tgtOrig string, errs chan error, traced bool) error {
                return nil
        }
 
-       // Start preparing .dep
+       // Start preparing .rec
        fdDep, err := tempfile(redoDir, tgt+DepSuffix)
        if err != nil {
                lockRelease()
@@ -542,7 +542,7 @@ func runScript(tgtOrig string, errs chan error, traced bool) error {
                        }
                }
 
-               // Commit .dep
+               // Commit .rec
                if !NoSync {
                        err = fdDep.Sync()
                        if err != nil {
index 2e3ca5e0f9eabb6435221daacf3c1ba71c7ba67b..5ab869c013b853d33c98a337bfbe548703f35275 100755 (executable)
@@ -28,7 +28,7 @@ test_expect_success Rebuild "redo-ifchange sub/index.html"
 stat2=`stat sub/index.html`
 test_expect_success "Was not rebuild" '[ "$stat1" = "$stat2" ]'
 
-tgts=`sed -n "s/^Target: //p" sub/.redo/index.html.dep | sort`
+tgts=`sed -n "s/^Target: //p" sub/.redo/index.html.rec | sort`
 tgts=`echo $tgts`
 tgts_expected="../default.html.do" # .do itself
 tgts_expected="$tgts_expected default.do" # ifcreate
index d31db406f97f35b5389056ef97cfc3ac97923ce4..affd4540c56254502d11290fbb039fa514e65f99 100644 (file)
--- a/usage.go
+++ b/usage.go
@@ -26,7 +26,7 @@ import (
 )
 
 const (
-       Version  = "1.1.0"
+       Version  = "1.2.0"
        Warranty = `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
 the Free Software Foundation, version 3 of the License.