Contributing to the Glean SDK
Anyone is welcome to help with the Glean SDK project. Feel free to get in touch with other community members on chat.mozilla.org
or through issues on GitHub or Bugzilla.
Participation in this project is governed by the Mozilla Community Participation Guidelines.
Bug Reports
To report issues or request changes, file a bug in Bugzilla in Data Platform & Tools :: Glean: SDK.
If you don't have a Bugzilla account, we also accept issues on GitHub.
Making Code Changes
To work on the code in this repository you will need to be familiar with the Rust programming language. You can get a working rust compiler and toolchain via rustup.
You can check that everything compiles by running the following from the root of your checkout:
make test-rust
If you plan to work on the Android component bindings, you should also review the instructions for setting up an Android build environment.
To run all Kotlin tests:
make test-kotlin
or run tests in Android Studio.
To run all Swift tests:
make test-swift
or run tests in Xcode.
Sending Pull Requests
Patches should be submitted as pull requests (PRs).
Before submitting a PR:
- Your code must run and pass all the automated tests before you submit your PR for review.
- "Work in progress" pull requests are allowed to be submitted, but should be clearly labeled as such and should not be merged until all tests pass and the code has been reviewed.
- For changes to Rust code
make test-rust
produces no test failuresmake lint-rust
runs without emitting any warnings or errors.make fmt-rust
should be used to format your changed Rust code.
- For changes to Kotlin code
make test-kotlin
runs without emitting any warnings or errors.make ktlint
runs without emitting any warnings.
- For changes to Swift code
make test-swift
(or running tests in Xcode) runs without emitting any warnings or errors.make swiftlint
runs without emitting any warnings or errors.
- Your patch should include new tests that cover your changes. It is your and your reviewer's responsibility to ensure your patch includes adequate tests.
When submitting a PR:
- You agree to license your code under the project's open source license (MPL 2.0).
- Base your branch off the current
main
. - Add both your code and new tests if relevant.
- Please do not include merge commits in pull requests; include only commits with the new relevant code.
- When submitting a PR for a bug, label the PR "Bug
" - When committing a PR and when it makes sense to skip the CI, add in a
[doc only]
annotation to the commit message
Code Review
This project is production Mozilla code and subject to our engineering practices and quality standards. Every patch must be peer reviewed by a member of the Glean core team.
Reviewers are defined in the CODEOWNERS file and are automatically added for every pull request. Every pull request needs to be approved by at least one of these people before landing.
The submitter needs to decide on their own discretion whether the changes require a look from more than a single reviewer or any outside developer. Reviewers can also ask for additional approval from other reviewers.
Release
See the Release process on how to release a new version of the Glean SDK.