1# Contributing to nix 2 3We're really glad you're interested in contributing to nix! This 4document has a few pointers and guidelines to help get you started. 5 6To have a welcoming and inclusive project, nix uses the Rust project's 7[Code of Conduct][conduct]. All contributors are expected to follow it. 8 9[conduct]: https://www.rust-lang.org/conduct.html 10 11 12# Issues 13 14We use GitHub's [issue tracker][issues]. 15 16[issues]: https://github.com/nix-rust/nix/issues 17 18 19## Bug reports 20 21Before submitting a new bug report, please [search existing 22issues][issue-search] to see if there's something related. If not, just 23[open a new issue][new-issue]! 24 25As a reminder, the more information you can give in your issue, the 26easier it is to figure out how to fix it. For nix, this will likely 27include the OS and version, and the architecture. 28 29[issue-search]: https://github.com/nix-rust/nix/search?utf8=%E2%9C%93&q=is%3Aissue&type=Issues 30[new-issue]: https://github.com/nix-rust/nix/issues/new 31 32 33## Feature / API requests 34 35If you'd like a new API or feature added, please [open a new 36issue][new-issue] requesting it. As with reporting a bug, the more 37information you can provide, the better. 38 39 40## Labels 41 42We use labels to help manage issues. The structure is modeled after 43[Rust's issue labeling scheme][rust-labels]: 44- **A-** prefixed labels state which area of the project the issue 45 relates to 46- **E-** prefixed labels explain the level of experience necessary to fix the 47 issue 48- **O-** prefixed labels specify the OS for issues that are OS-specific 49- **R-** prefixed labels specify the architecture for issues that are 50 architecture-specific 51 52[rust-labels]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#issue-triage 53 54 55# Pull requests 56 57GitHub pull requests are the primary mechanism we use to change nix. GitHub itself has 58some [great documentation][pr-docs] on using the Pull Request feature. We use the 'fork and 59pull' model described there. 60 61Please make pull requests against the `master` branch. 62 63If you change the API by way of adding, removing or changing something or if 64you fix a bug, please add an appropriate note to the [change log][cl]. We 65follow the conventions of [Keep A CHANGELOG][kacl]. 66 67[cl]: https://github.com/nix-rust/nix/blob/master/CHANGELOG.md 68[kacl]: https://github.com/olivierlacan/keep-a-changelog/tree/18adb5f5be7a898d046f6a4acb93e39dcf40c4ad 69[pr-docs]: https://help.github.com/articles/using-pull-requests/ 70 71## Testing 72 73nix has a test suite that you can run with `cargo test`. Ideally, we'd like pull 74requests to include tests where they make sense. For example, when fixing a bug, 75add a test that would have failed without the fix. 76 77After you've made your change, make sure the tests pass in your development 78environment. We also have [continuous integration set up on 79Cirrus-CI][cirrus-ci], which might find some issues on other platforms. The CI 80will run once you open a pull request. 81 82There is also infrastructure for running tests for other targets 83locally. More information is available in the [CI Readme][ci-readme]. 84 85[cirrus-ci]: https://cirrus-ci.com/github/nix-rust/nix 86[ci-readme]: ci/README.md 87 88### Disabling a test in the CI environment 89 90Sometimes there are features that cannot be tested in the CI environment. 91To stop a test from running under CI, add `skip_if_cirrus!()` to it. Please 92describe the reason it shouldn't run under CI, and a link to an issue if 93possible! 94 95## bors, the bot who merges all the PRs 96 97All pull requests are merged via [bors], an integration bot. After the 98pull request has been reviewed, the reviewer will leave a comment like 99 100> bors r+ 101 102to let bors know that it was approved. Then bors will check that it passes 103tests when merged with the latest changes in the `master` branch, and 104merge if the tests succeed. 105 106[bors]: https://bors-ng.github.io/ 107 108 109## API conventions 110 111If you're adding a new API, we have a [document with 112conventions][conventions] to use throughout the nix project. 113 114[conventions]: https://github.com/nix-rust/nix/blob/master/CONVENTIONS.md 115