2016-02-19 17:30:36 -05:00
|
|
|
# Contributing to nix
|
|
|
|
|
|
|
|
We're really glad you're interested in contributing to nix! This
|
|
|
|
document has a few pointers and guidelines to help get you started.
|
|
|
|
|
|
|
|
To have a welcoming and inclusive project, nix uses the Rust project's
|
|
|
|
[Code of Conduct][conduct]. All contributors are expected to follow it.
|
|
|
|
|
|
|
|
[conduct]: https://www.rust-lang.org/conduct.html
|
|
|
|
|
|
|
|
|
|
|
|
# Issues
|
|
|
|
|
|
|
|
We use GitHub's [issue tracker][issues].
|
|
|
|
|
|
|
|
[issues]: https://github.com/nix-rust/nix/issues
|
|
|
|
|
|
|
|
|
|
|
|
## Bug reports
|
|
|
|
|
|
|
|
Before submitting a new bug report, please [search existing
|
|
|
|
issues][issue-search] to see if there's something related. If not, just
|
|
|
|
[open a new issue][new-issue]!
|
|
|
|
|
|
|
|
As a reminder, the more information you can give in your issue, the
|
|
|
|
easier it is to figure out how to fix it. For nix, this will likely
|
|
|
|
include the OS and version, and the architecture.
|
|
|
|
|
|
|
|
[issue-search]: https://github.com/nix-rust/nix/search?utf8=%E2%9C%93&q=is%3Aissue&type=Issues
|
|
|
|
[new-issue]: https://github.com/nix-rust/nix/issues/new
|
|
|
|
|
|
|
|
|
|
|
|
## Feature / API requests
|
|
|
|
|
|
|
|
If you'd like a new API or feature added, please [open a new
|
|
|
|
issue][new-issue] requesting it. As with reporting a bug, the more
|
|
|
|
information you can provide, the better.
|
|
|
|
|
|
|
|
|
|
|
|
## Labels
|
|
|
|
|
|
|
|
We use labels to help manage issues. The structure is modeled after
|
|
|
|
[Rust's issue labeling scheme][rust-labels]:
|
2021-07-15 10:37:36 +00:00
|
|
|
- **A-** prefixed labels state which area of the project the issue
|
2016-02-19 17:30:36 -05:00
|
|
|
relates to
|
2021-07-15 10:37:36 +00:00
|
|
|
- **E-** prefixed labels explain the level of experience necessary to fix the
|
2016-03-06 14:36:00 -05:00
|
|
|
issue
|
2021-07-15 10:37:36 +00:00
|
|
|
- **O-** prefixed labels specify the OS for issues that are OS-specific
|
|
|
|
- **R-** prefixed labels specify the architecture for issues that are
|
2016-03-17 07:49:35 -04:00
|
|
|
architecture-specific
|
2016-02-19 17:30:36 -05:00
|
|
|
|
|
|
|
[rust-labels]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#issue-triage
|
|
|
|
|
|
|
|
|
|
|
|
# Pull requests
|
|
|
|
|
|
|
|
GitHub pull requests are the primary mechanism we use to change nix. GitHub itself has
|
|
|
|
some [great documentation][pr-docs] on using the Pull Request feature. We use the 'fork and
|
|
|
|
pull' model described there.
|
|
|
|
|
|
|
|
Please make pull requests against the `master` branch.
|
|
|
|
|
2016-07-22 23:37:51 +02:00
|
|
|
If you change the API by way of adding, removing or changing something or if
|
|
|
|
you fix a bug, please add an appropriate note to the [change log][cl]. We
|
|
|
|
follow the conventions of [Keep A CHANGELOG][kacl].
|
2016-02-19 17:30:36 -05:00
|
|
|
|
2016-07-22 23:37:51 +02:00
|
|
|
[cl]: https://github.com/nix-rust/nix/blob/master/CHANGELOG.md
|
|
|
|
[kacl]: https://github.com/olivierlacan/keep-a-changelog/tree/18adb5f5be7a898d046f6a4acb93e39dcf40c4ad
|
|
|
|
[pr-docs]: https://help.github.com/articles/using-pull-requests/
|
2016-02-19 17:30:36 -05:00
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
|
|
|
nix has a test suite that you can run with `cargo test`. Ideally, we'd like pull
|
|
|
|
requests to include tests where they make sense. For example, when fixing a bug,
|
|
|
|
add a test that would have failed without the fix.
|
|
|
|
|
|
|
|
After you've made your change, make sure the tests pass in your development
|
|
|
|
environment. We also have [continuous integration set up on
|
2020-12-10 19:51:12 -07:00
|
|
|
Cirrus-CI][cirrus-ci], which might find some issues on other platforms. The CI
|
2016-02-19 17:30:36 -05:00
|
|
|
will run once you open a pull request.
|
|
|
|
|
2016-03-14 13:03:51 -05:00
|
|
|
There is also infrastructure for running tests for other targets
|
|
|
|
locally. More information is available in the [CI Readme][ci-readme].
|
2016-02-19 17:30:36 -05:00
|
|
|
|
2020-12-10 19:51:12 -07:00
|
|
|
[cirrus-ci]: https://cirrus-ci.com/github/nix-rust/nix
|
2016-03-14 13:03:51 -05:00
|
|
|
[ci-readme]: ci/README.md
|
2016-02-19 17:30:36 -05:00
|
|
|
|
2017-04-16 23:51:18 -04:00
|
|
|
### Disabling a test in the CI environment
|
|
|
|
|
|
|
|
Sometimes there are features that cannot be tested in the CI environment.
|
2020-12-10 19:51:12 -07:00
|
|
|
To stop a test from running under CI, add `skip_if_cirrus!()` to it. Please
|
|
|
|
describe the reason it shouldn't run under CI, and a link to an issue if
|
|
|
|
possible!
|
2017-04-16 23:51:18 -04:00
|
|
|
|
2017-04-15 18:18:22 -04:00
|
|
|
## bors, the bot who merges all the PRs
|
2016-02-19 17:30:36 -05:00
|
|
|
|
2017-04-15 18:18:22 -04:00
|
|
|
All pull requests are merged via [bors], an integration bot. After the
|
2016-02-19 17:30:36 -05:00
|
|
|
pull request has been reviewed, the reviewer will leave a comment like
|
|
|
|
|
2017-04-15 18:18:22 -04:00
|
|
|
> bors r+
|
2016-02-19 17:30:36 -05:00
|
|
|
|
2017-04-15 18:18:22 -04:00
|
|
|
to let bors know that it was approved. Then bors will check that it passes
|
|
|
|
tests when merged with the latest changes in the `master` branch, and
|
|
|
|
merge if the tests succeed.
|
2016-02-19 17:30:36 -05:00
|
|
|
|
2017-04-15 18:18:22 -04:00
|
|
|
[bors]: https://bors-ng.github.io/
|
2016-02-19 17:30:36 -05:00
|
|
|
|
|
|
|
|
|
|
|
## API conventions
|
|
|
|
|
|
|
|
If you're adding a new API, we have a [document with
|
|
|
|
conventions][conventions] to use throughout the nix project.
|
|
|
|
|
|
|
|
[conventions]: https://github.com/nix-rust/nix/blob/master/CONVENTIONS.md
|