Make apenwarr/redo installable on windows and work with uv tool install
Find a file
Avery Pennarun e247a72300 jobserver: don't release the very last token in wait_all().
After waiting for children to exit, we would release our own token, and
then the caller would immediately try to obtain a token again.  This
accounted for tokens correctly, but would pass tokens around the call
tree in unexpected ways.

For example, imagine we had only one token.  We call 'redo a1 a2', and
a1 calls 'redo b1 b2', and b1 calls 'redo c1'.  When c1 exits, it
releases its token, then tries to re-acquire it before exiting.  This
also includes 'redo b1 b2' and 'redo a1 a2' in the race for the token,
which means b1 might get suspended while *either* a2 or b2 starts
running.

This never caused a deadlock, even if a2 or b2 depends on b1, because
if they tried to build b1, they would notice it is locked, give up
their token, and wait for the lock.  c1 (and then b1) could then obtain
the token and immediately terminate, allowing progress to continue.

But this is not really the way we expect things to happen.  "Obviously"
what we want here is a straightforward stack unwinding: c1 should finish,
then b1, then b2, then a1, then b2.

The not-very-obvious symptom of this bug is that redo's unit tests
seemed to run in the wrong order when using -j1 --no-log.  (--log would
hide the problem by rearranging logs back into the right order!)
2018-12-31 19:02:55 -05:00
bin Move setproctitle() stuff into title.py. 2018-12-05 02:28:34 -05:00
contrib/bash_completion.d MacOS: "-e filename/." returns true even for non-directories. 2011-03-05 19:03:30 -08:00
docs Move _all.do -> all.do and slightly update docs. 2018-12-31 15:07:18 -05:00
minimal Avoid symlinking to /bin/true in minimal/do, which fails when /bin/true is busybox (#24) 2018-12-31 13:27:43 -05:00
redo jobserver: don't release the very last token in wait_all(). 2018-12-31 19:02:55 -05:00
t shelltest: add some tests around 'local' and 'set -u'. 2018-12-20 08:55:14 +00:00
.gitignore Fix more inconsistent behaviour with symlinks in paths. 2018-12-17 16:17:37 +00:00
.pylintrc Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
all.do Move _all.do -> all.do and slightly update docs. 2018-12-31 15:07:18 -05:00
clean.do Fix more inconsistent behaviour with symlinks in paths. 2018-12-17 16:17:37 +00:00
do Fix more inconsistent behaviour with symlinks in paths. 2018-12-17 16:17:37 +00:00
install.do Move _all.do -> all.do and slightly update docs. 2018-12-31 15:07:18 -05:00
LICENSE Change license to Apache 2.0. 2018-11-26 17:04:31 -05:00
Makefile Directory reorg: move code into redo/, generate binaries in bin/. 2018-12-04 02:53:40 -05:00
mkdocs.yml Directory reorg: move code into redo/, generate binaries in bin/. 2018-12-04 02:53:40 -05:00
README.md Move _all.do -> all.do and slightly update docs. 2018-12-31 15:07:18 -05:00
test.do Move _all.do -> all.do and slightly update docs. 2018-12-31 15:07:18 -05:00

redo - a recursive build system

Smaller, easier, more powerful, and more reliable than make.

This is an implementation of Daniel J. Bernstein's redo build system. He never released his version, so other people have implemented different variants based on his published specification.

This version, sometimes called apenwarr/redo, is probably the most advanced one, including parallel builds, improved logging, extensive automated tests, and helpful debugging features.

To build and test redo, run ./do -j10 test. To install it, run DESTDIR=/tmp/testinstall PREFIX=/usr/local ./do -j10 install.


  • View the documentation via readthedocs.org
  • Visit the source code on github
  • Discussions and support via the mailing list (archives). You can subscribe by sending any email message to redo-list+subscribe@googlegroups.com (note the plus sign).