]> Cypherpunks.ru repositories - goredo.git/commitdiff
Prepare for release
authorSergey Matveev <stargrave@stargrave.org>
Sat, 7 Oct 2023 19:57:38 +0000 (22:57 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 7 Oct 2023 19:57:38 +0000 (22:57 +0300)
doc/cmds.texi
doc/faq.texi
doc/news.texi
doc/state.texi
usage.go

index 8beb84cbebd7d14ac755614f8a7ab58b5fc6d2d9..72d1238d16e83bf080ef592b01cc5c9f4d7f825e 100644 (file)
@@ -139,7 +139,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/*.rec are filled up
+$ redo target [...] # to assure that **/.redo/*.dep are filled up
 $ redo-dot target [...] > whatever.dot
 $ dot -Tpng whatever.dot > whatever.png # possibly add -Gsplines=ortho
 @end example
@@ -152,6 +152,14 @@ $ dot -Tpng whatever.dot > whatever.png # possibly add -Gsplines=ortho
     rereading the whole files for hash calculation, that is much slower.
     If you do not want to rebuild your targets from the ground, then
     @command{redo-depfix} can traverse through all dependency files and
-    check if they have non-altered ctime values and update them in place.
+    recalculate dependency information.
+
+    Also if it finds legacy @command{.rec} dependency files, it converts
+    them to binary format.
+
+@pindex redo-dep2rec
+@item redo-dep2rec
+    Convert specified @file{.dep} file to recfile on stdout.
+    Aimed to be used mainly for debugging purposes.
 
 @end table
index 7fc12a0efa56f119ec1e3948792d883ef5d1ae58..7f6552126110f8ba03b80ffe86a0581569137dc0 100644 (file)
@@ -43,7 +43,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{.rec} file, but it does not play any role later. It
+stamp in the @file{.dep} 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?
@@ -53,7 +53,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.rec}.
+then remove @file{foo/.redo/bar.dep}.
 
 @section Does redo-always always rebuilds target?
 
index cdaac282dccfb24e7b724bad6e5ace0cb4259ccf..ec0d5e86bb6a734b68ebed7af3255280a0796869 100644 (file)
@@ -2,6 +2,46 @@
 @cindex news
 @unnumbered News
 
+@anchor{Release 2_0_0}
+@section Release 2.0.0
+@itemize
+@item
+Huge quantity of performance optimisations.
+
+@item
+Fixed possible unexpected lock file closing.
+
+@item
+When resulting target has the same contents, it does not replace already
+existing one. That was done previously. But now it also copies the file's
+mode flags to the target (for example making it executable).
+
+@item
+If @command{redo-*} command runs under control of another (top-level)
+redo, then it does not parse the flags as options and treat each
+argument as a target, allowing passing the targets with dashes in the
+beginning.
+
+@item
+Prevented possible concurrent stderr writing by multiple running
+targets.
+
+@item
+@command{redo-depfix} command now always rewrites dependency files and
+calculates checksums of the files.
+
+@item
+Own binary format is used for dependency files (@file{.dep}), instead of
+recfile (@file{.rec}) one. It is several times smaller and much faster
+to parse. You must run @command{redo-depfix} to convert all existing
+@file{.redo/*.rec} files to that binary format.
+
+@item
+@command{redo-dep2rec} command appeared, that can convert @file{.dep} to
+recfile on stdout.
+
+@end itemize
+
 @anchor{Release 1_32_0}
 @section Release 1.32.0
 @itemize
index 5b0e05c221ac148a3d5f4381647b4f4c78b19eee..0a3b3d802fc1a83a3aff08b9b2f438e06c0a11bf 100644 (file)
@@ -5,9 +5,72 @@
 
 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{.rec} file. It is
-@url{https://www.gnu.org/software/recutils/, recfile}, that could have
-various dependency information. For example:
+recreated with every rebuild, binary @file{.dep} file.
+
+It starts with the header:
+
+@verbatim
+"GOREDO" || 0x01 || BuildUUID
+@end verbatim
+
+@code{0x01} is format's version number. @code{BuildUUID} is 128-bit UUID.
+
+After the header comes concatenation of length-prefixed chunks. Length
+is the length of the whole chunk, including the size of the encoded
+length itself. It is 16-bit big-endian integer. After the length comes
+single byte type of the chunk:
+
+@table @asis
+
+@item ifcreate
+
+@verbatim
+LEN || 0x01 || target
+@end verbatim
+
+@code{target} is UTF-8 encoded target's name.
+
+@item ifchange
+
+@verbatim
+LEN || 0x02 ||
+    size || inodeNum ||
+    ctimeSec || ctimeNsec ||
+    mtimeSec || mtimeNsec ||
+    hash || target
+@end verbatim
+
+@code{target} is UTF-8 encoded target's name.
+@code{hash} is 256-bit BLAKE3 hash.
+All other inode-related fields are 64-bit big-endian integers.
+
+@item always
+
+@verbatim
+LEN || 0x03
+@end verbatim
+
+@item stamp
+
+@verbatim
+LEN || 0x04 || hash
+@end verbatim
+
+@code{hash} is 256-bit BLAKE3 hash.
+
+@item ifchange-nonexistent
+
+@verbatim
+LEN || 0x05 || target
+@end verbatim
+
+@code{target} is UTF-8 encoded target's name.
+
+@end table
+
+That @file{.dep} file can be converted to human-readable
+@url{https://www.gnu.org/software/recutils/, recfile} format.
+For example:
 
 @example
 Build: 80143f04-bfff-4673-950c-081d712f573d
@@ -31,5 +94,5 @@ Type: stamp
 Hash: 5bbdf635932cb16b9127e69b6f3872577efed338f0a4ab6f2c7ca3df6ce50cc9
 @end example
 
-And the schema definition:
+And its schema definition:
 @verbatiminclude ../dep.rec
index f14ad7edbad9005cbec851e09f9725fab65d1146..f29b2b9d1bdd7f532656f85233634f17ebf9b967 100644 (file)
--- a/usage.go
+++ b/usage.go
@@ -105,6 +105,10 @@ List all currently known out-of-date targets.`
                d = `Usage: redo-affects target [...]
 
 List all targets that will be affected by changing the specified ones.`
+       case CmdNameRedoDep2Rec:
+               d = `Usage: redo-dep2rec .../.redo/file.dep
+
+Convert binary .dep file to recfile and write it to stdout.`
        case CmdNameRedoDepFix:
                d = `Usage: redo-depfix