Ways to Contribute
You can help the Dart project in several ways:- Report bugs at dartbug.com
- Answer questions on Stack Overflow
- Improve documentation on dart.dev or API docs
- Contribute code via Gerrit or GitHub pull requests
Documentation Contributions
You have three options for improving documentation:- Give feedback: Click the bug icon on documentation pages or create an SDK issue
- Contribute to websites: Help improve dart.dev via the dart-lang/site-www repo
- Improve API docs: Edit doc comments in the Dart SDK repo
Before You Contribute
Sign the CLA
Before we can use your code, you must sign the Google Individual Contributor License Agreement (CLA). You don’t need to sign until after your code is approved for review, but it must be done before we can merge your contribution.For corporate contributions, use the Software Grant and Corporate Contributor License Agreement.
Coordinate Large Changes
For larger contributions, get in touch through the Dart Issue Tracker first. Coordinating up front helps avoid frustration later.Setting Up Your Environment
Install depot_tools
Install the Chromium depot_tools to work with the Dart codebase.
Get the source code
Use
gclient to download the code. Do not use git clone directly - it won’t give you a functional environment.See Building from Source for complete instructions.Submitting Code Changes
Using GitHub Pull Requests
While Gerrit is the primary code review system, you can submit GitHub PRs for smaller changes like documentation edits:- Create a PR on GitHub
- The copybara-service bot automatically converts it to a Gerrit CL
- Find the Gerrit CL link in the bot’s comment
- The PR closes automatically when the CL is merged
Using Gerrit (Recommended)
Upload for review
Code Review Process
All submissions require review, including those from project members.Getting Reviewers
OWNERS file to escalate.
Submitting the Patch
For committers:- Press “Submit to CQ” (Commit Queue) on dart-review.googlesource.com
- Monitor progress in the “Tryjobs” panel
- Once CQ is green, the patch merges automatically
- Fix any red try jobs and resubmit
Coding Style
Follow these style guides:- C++ code: Google C++ style guide
- Dart code: Dart style guide
File Headers
All files must start with this header:Use a single year (not a range). When editing existing files, you don’t need to update the year.