apenwarr-redo/redo
Avery Pennarun 19049d52fc jobserver: allow overriding the parent jobserver in a subprocess.
Previously, if you passed a -j option to a redo process in a redo or
make process hierarchy with MAKEFLAGS already set, it would ignore the
-j option and continue using the jobserver provided by the parent.

With this change, we instead initialize a new jobserver with the
desired number of tokens, which is what GNU make does in the same
situation.  A typical use case for this is to force serialization of
build steps in a subtree (by using -j1).  In make, this is often useful
for "fixing" makefiles that haven't been written correctly for parallel
builds.  In redo, that happens much less often, but it's useful at
least in unit tests.

Passing -j1 is relatively harmless (the redo you are starting inherits
a token anyway, so it doesn't create any new tokens).  Passing -j > 1
is more risky, because it creates new tokens, thus increasing the level
of parallelism in the system.  Because this may not be what you wanted,
we print a warning when you pass -j > 1 to a sub-redo.  GNU make gives
a similar warning in this situation.
2018-12-31 19:24:27 -05:00
..
version Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
.gitignore Rename redo/python -> redo/py. 2018-12-05 02:27:04 -05:00
__init__.py Directory reorg: move code into redo/, generate binaries in bin/. 2018-12-04 02:53:40 -05:00
atoi.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
builder.py jobserver: don't release the very last token in wait_all(). 2018-12-31 19:02:55 -05:00
clean.do Rename redo/python -> redo/py. 2018-12-05 02:27:04 -05:00
cmd_always.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_ifchange.py jobserver: allow overriding the parent jobserver in a subprocess. 2018-12-31 19:24:27 -05:00
cmd_ifcreate.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_log.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_ood.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_redo.py jobserver: allow overriding the parent jobserver in a subprocess. 2018-12-31 19:24:27 -05:00
cmd_sources.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_stamp.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_targets.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_unlocked.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cmd_whichdo.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
cycles.py Move env.{add,get}_lock() into cycles.py, and rename. 2018-12-05 02:26:58 -05:00
deps.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
env.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
helpers.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
jobserver.py jobserver: allow overriding the parent jobserver in a subprocess. 2018-12-31 19:24:27 -05:00
logs.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
options.py Directory reorg: move code into redo/, generate binaries in bin/. 2018-12-04 02:53:40 -05:00
paths.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
py.do Rename redo/python -> redo/py. 2018-12-05 02:27:04 -05:00
sh.do shelltest.od: add more "set -e" tests and add a 'skip' return code. 2018-12-17 16:17:37 +00:00
state.py Fix more inconsistent behaviour with symlinks in paths. 2018-12-17 16:17:37 +00:00
title.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
whichpython.do Directory reorg: move code into redo/, generate binaries in bin/. 2018-12-04 02:53:40 -05:00