You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: add a contributor guide with recipes for adding a lowering rule, a pass and a compiler #965
A first contribution here goes through more rules than its contributor is told about up front. At c387e25c:
Reading. The root guidance, the README and the documents the guidance says to read first come to 74,854 words, about 5.4 hours at 230 words a minute.
Rules. The root guidance states 58 rules. 14 are fully mechanized, 16 partly, and 28 (48%) are prose only.
Learned by failing. Three throwaway contributions, each built and run through the suite, met rules one failure at a time:
A second compiler took 2 new files plus 2 edited ones. The layering test failed first with "not allowed for compilers", which does not say a rules entry is missing. The 100% coverage gate then flagged a loop that only a fault-injection seam reaches.
One OpenAPI lowering rule (as fix(compilers/openapi): map sized integer formats to primitives #728 did) touched 6 files: the format table, its test, the conformance case and its spec, a regenerated golden, and a 531-character insertion into one 13,557-character line of ir-design.
Direction
A proposal: a CONTRIBUTING.md that gives three recipes, each a checklist with the commands to run:
add a lowering rule;
add a pass;
add a compiler.
Each step names the test that fails when it is missed. The guide links the design documents rather than restating them. The root guidance keeps the rules and points newcomers at the recipes first.
Done when each recipe, followed literally on a clean checkout, ends with make gate green.
Activity