|
1 | 1 | # Contributing to ClojureWasm |
2 | 2 |
|
3 | | -Thanks for your interest. ClojureWasm is an early-stage runtime built by a very |
4 | | -small team, so **Issues and Pull Requests are currently paused**. The most useful |
5 | | -things you can do right now are to **read along, try it, and report behaviour that |
6 | | -differs from JVM Clojure** — please do that in |
7 | | -[GitHub Discussions](https://github.com/clojurewasm/ClojureWasm/discussions) and |
8 | | -mention `@chaploud`. |
| 3 | +Thanks for your interest. **Issues and Pull Requests are open.** This is a |
| 4 | +small project, so replies can take a while — but the queue is real and it gets |
| 5 | +read. |
9 | 6 |
|
10 | | -## Reporting a divergence from Clojure |
| 7 | +## The most useful thing you can do |
| 8 | + |
| 9 | +**Report Clojure code that behaves differently here than on the JVM.** |
11 | 10 |
|
12 | 11 | ClojureWasm targets behavioural equivalence with JVM Clojure on the |
13 | | -user-observable surface. If you find an expression that behaves differently: |
| 12 | +user-observable surface. Every divergence you find is either a bug or a gap |
| 13 | +that has not been written down yet — and finding them from the outside is worth |
| 14 | +more than anything else, because a project cannot easily see its own blind |
| 15 | +spots. |
| 16 | + |
| 17 | +There is a [Clojure divergence issue template](https://github.com/clojurewasm/ClojureWasm/issues/new?template=divergence.yml) |
| 18 | +that asks for the three things that make such a report actionable: the |
| 19 | +expression, what `cljw` prints, and what a JVM REPL prints. |
14 | 20 |
|
15 | | -1. Check whether it is already a known, intentional difference in |
16 | | - [`docs/clojure_vs_clojurewasm.md`](../docs/clojure_vs_clojurewasm.md). |
17 | | -2. If not, start a |
18 | | - [Discussion](https://github.com/clojurewasm/ClojureWasm/discussions) with the |
19 | | - expression, what `cljw` prints, and what a JVM Clojure REPL prints. |
| 21 | +Some differences are deliberate — check |
| 22 | +[`docs/clojure_vs_clojurewasm.md`](../docs/clojure_vs_clojurewasm.md) first. If |
| 23 | +one is listed there and you think the reasoning is wrong, that is a good |
| 24 | +Discussion. |
20 | 25 |
|
21 | 26 | ## Working on the code |
22 | 27 |
|
23 | 28 | ```sh |
24 | 29 | direnv allow # one-time: load Zig 0.16.0 via Nix (or: nix develop) |
25 | 30 | zig build -Dwasm -Doptimize=ReleaseSafe # build the Wasm-enabled `cljw` binary |
26 | | -bash test/run_all.sh # the full test suite must be green before a change lands |
| 31 | +bash test/run_all.sh --serial-e2e # the full gate; must be green before a change lands |
27 | 32 | ``` |
28 | 33 |
|
29 | | -`test/run_all.sh` runs the full gate; if a run flakes on a concurrency test, the |
30 | | -serial mode (`bash test/run_all.sh --serial-e2e`) is authoritative. |
| 34 | +For a quick loop while iterating, `bash test/run_all.sh --smoke <e2e-step>` |
| 35 | +runs the unit tests, the dual-backend differential oracle, the linter, and the |
| 36 | +one end-to-end step you touched — tens of seconds instead of ~20 minutes. Run |
| 37 | +the full gate before you open the PR. |
| 38 | + |
| 39 | +Branch from `main` as `develop/<short-slug>`, open a PR, and let CI run. CI |
| 40 | +runs the same gate on macOS and Linux; a green CI is what merges. |
| 41 | + |
| 42 | +### What we do **not** ask of you |
| 43 | + |
| 44 | +This repository is developed largely by an autonomous loop working under |
| 45 | +written guardrails, and that loop follows conventions that exist to keep *it* |
| 46 | +honest. **None of them apply to your contribution:** |
| 47 | + |
| 48 | +- You do not need a `Smell-audited:` line in your commit message. |
| 49 | +- You do not need to add a row to `.dev/debt.yaml`. |
| 50 | +- You do not need to write an ADR, a per-task note, or a ROADMAP amendment. |
| 51 | +- You do not need to match the commit-message style of the surrounding history. |
| 52 | + |
| 53 | +Write a clear commit message, keep the gate green, and that is enough. If a |
| 54 | +change turns out to need a design record, writing it is the maintainer's job, |
| 55 | +not yours. |
| 56 | + |
| 57 | +### What helps a PR land |
| 58 | + |
| 59 | +- **One concern per PR.** A 30-line fix with a test merges; a 600-line |
| 60 | + refactor bundled with a fix stalls. |
| 61 | +- **A test that fails before your change and passes after it.** The test |
| 62 | + taxonomy is in [`.claude/rules/test_taxonomy.md`](../.claude/rules/test_taxonomy.md); |
| 63 | + in short, unit tests live in `test "..."` blocks next to the code and CLI |
| 64 | + behaviour lives in `test/e2e/*.sh`. |
| 65 | +- For a `clojure.core` behaviour change, **a line in the relevant corpus under |
| 66 | + `test/diff/clj_corpus/`**, so the behaviour stays checked against real `clj` |
| 67 | + from then on. |
| 68 | + |
| 69 | +A note on provenance: much of this codebase is machine-written under human |
| 70 | +review and direction. Contributions from people are very welcome and are |
| 71 | +reviewed the same way — on whether the code is right, not on who wrote it. |
31 | 72 |
|
32 | | -The project follows a TDD loop (red → green → refactor) and keeps tests green on |
33 | | -every commit. The development workflow, design principles, and the amendment |
34 | | -process for the roadmap are documented in [`CLAUDE.md`](../.claude/CLAUDE.md) and |
35 | | -[`.dev/`](../.dev/) (ROADMAP, decision records, principles). Load-bearing |
36 | | -decisions are recorded as ADRs under [`.dev/decisions/`](../.dev/decisions/). |
| 73 | +## Design context, if you want it |
37 | 74 |
|
38 | | -A note on provenance: much of this codebase is written by an autonomous |
39 | | -development loop under written guardrails and ADR discipline. Human review and |
40 | | -direction set the rails; contributions from people are very welcome and reviewed |
41 | | -the same way. |
| 75 | +Load-bearing decisions are recorded as ADRs under |
| 76 | +[`.dev/decisions/`](../.dev/decisions/); the plan and its principles live in |
| 77 | +[`.dev/ROADMAP.md`](../.dev/ROADMAP.md); the development loop itself is |
| 78 | +described in [`.claude/CLAUDE.md`](../.claude/CLAUDE.md). None of this is |
| 79 | +required reading to send a patch — it is there if you want to know why |
| 80 | +something is the way it is. |
42 | 81 |
|
43 | 82 | ## Getting in touch |
44 | 83 |
|
45 | | -Questions and discussion are welcome in |
| 84 | +Open-ended questions belong in |
46 | 85 | [GitHub Discussions](https://github.com/clojurewasm/ClojureWasm/discussions); |
47 | 86 | the wider Clojure community also gathers on the |
48 | 87 | [Clojurians Slack](https://clojurians.slack.com). |
|
0 commit comments