Help build Parsec
A page Parsec parses differently from a browser, a selector it gets wrong, a benchmark run on your machine, a fix, a faster loop. All of it helps, and most of it starts with an issue.
Where to start
- Something bigger than a small fix? Open an issue first, so we agree on the shape before you spend an evening on it.
- A question? Discussions is the place.
- New here? Issues labelled good first issue are small, self-contained, and I'll help you through them.
When a real page breaks Parsec
This is the contribution I value most. A real site's page belongs to the site, so it can't go in the repository, but the smallest input that still fails can. parsec-reduce finds it for you, cutting tags, attributes, words and characters for as long as the failure still happens:
cargo run --release -p parsec-reduce -- page.html --check panic--check says what failing means: a panic, a hang over so many milliseconds, a tree that differs from html5ever's, or a command of your own. The reduced input goes into the regression tests with the site's address and the date, and from then on it keeps the bug fixed.
Not only code
- Benchmark runs on your machine. It takes about five minutes, and a result that disagrees with mine is the useful kind.
- Documentation: a page that confused you, an example that didn't work.
- Standards cases that fail, from the suites or from a browser that disagrees.
How review works
Parsec has two maintainers, and every pull request, mine included, needs an approving review from the one who didn't write it. A reviewer checks, in this order, that it's right, with a test that fails without it; that it's safe on hostile input; that it isn't slower, with numbers if it touches a parser; that the docs say what changed; and that CI is green on Linux, macOS and Windows.
Commit subjects say what was wrong, not what you did: fix(tree): a table inside a template lost its foster parent.
The contributor licence agreement
Parsec is Apache-2.0. Netweir, which builds on it, is AGPL-3.0 and also sold under a commercial licence, so before your first pull request merges you'll be asked to agree to the CLA by posting one comment. You keep the copyright in your work, and you only do it once.
The full guide, with how to build and test everything, is CONTRIBUTING.md. Everyone taking part follows the code of conduct.