Skip to content

Commit 701c36a

Browse files
committed
Fine-grained rules: third iteration of the design
This commit introduces an update of the design of fine-grained rules. Main changes to the design: - rules that depend on the output of another rule must depend on its `RuleId`, and not simply on the path of the output of the rule, - all searching happens in rule generation instead of in the build system, - users are required to define rule names which are used to register rules, with the API returning an opaque `RuleId` (with additional namespacing to ensure they can be combined across packages, using static pointers), - use of static pointers for actions, which allows us to get rid of `ActionId` and to get rid of the doubly-nested monadic structure; this improves debuggability (as we will show rule names that are meaningful to the user), - let the user be in control of what data is passed to the action that executes a rule, - removal of the rule `monitoredValue` (made redundant by `Eq Rule` instance) - additional functionality for declaring extra dynamic dependencies of rules, to avoid recomputing rules entirely when e.g. a `.chs` file is modified. This commit also fleshes out the justification of the design, comparing with Shake and ninja, and adds a bit more context about the requirements imposed by the IPC interface.
1 parent 2e6698e commit 701c36a

File tree

1 file changed

+631
-312
lines changed

1 file changed

+631
-312
lines changed

0 commit comments

Comments
 (0)