From 9258b573100c8efc208668741151be621567707b Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Thu, 1 Oct 2020 14:01:29 -0400 Subject: [PATCH] explicitly document the execution order of rule fields --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 49297e1..d826a53 100644 --- a/README.md +++ b/README.md @@ -257,6 +257,14 @@ the fancy example above: - `export`: A subdirectory that peru should treat as the root of the module tree. Everything else is dropped, including parent directories. +Note that these fields always take effect in the order listed above, regardless +of the order they're given in `peru.yaml`. For example, a `move` is always +performed before a `pick`. Also note that these fields can't be given twice. +For example, instead of using two separate `move` fields (one of which would be +ignored), use a single `move` field containing a list of moves. In practice, +things work this way because these fields are parsed as keys in a dictionary, +which don't preserve ordering and can't repeat. + Besides using those fields in your modules, you can also use them in "named rules", which let you transform one module in multiple ways. For example, say you want the `asyncio` subdir from the Tulip project, but you also want the