Reviewing contributions
The nixpkgs projects receives a fairly high number of contributions via github pull-requests. Reviewing and approving these is an important task and a way to contribute to the project.
The high activity of nixpkgs change make any pull request that is open for long enough subject to conflicts that will require extra from the submitter or the merger. Reviewing pull requests in a timely manner and being responsive to the comments is the key to avoid these. Github provides sort filters that can be used to see the most recently and the least recently updated pull-requests.
When reviewing a pull request, please always be nice and polite. Controversial changes can lead to controversial opinions, but it is important to respect every community members and their work.
Github provides emoji, they are a simple and quick way to provide feedback to pull-requests or any comments. The thumb-down emoji should be used with care and if possible accompanied with some explanations so the submitter has directions to improve his contribution.
Pull-requests reviews should include a list of what has been reviewed in a comment, so other reviewers and mergers can know the state of the review.
All the review template samples that are provided in this section are generic, and should be adapted by the reviewer to fit the pull-request content by adding or removing review points.
Package updates
A package update is the most trivial and common type of pull-request. These pull-requests mainly consist in updating the version part of the package name and the source hash.
It can happen that non trivial updates include patches or more complex changes.
Reviewing process:
Add labels to the pull-request.
8.has: package (update) and any topic label that fit the updated package.
Checking that the package versioning is fitting the guidelines.
Checking that the commit text is fitting the guidelines.
Checking that the package maintainers are notified.
mention-bot usually notify github users based on the submitted changes, but it can happen that it miss some of the package maintainers.
Checking that the code contains no typos.
Building the package locally.
Pull-requests are often targetted to the master or staging branch so building the pull-request locally as it is submitted can trigger a large amount of source builds.
It is possible to rebase the changes on nixos-unstable or nixpkgs-unstable for easier review.
TODO: add commands for a local rebase and build
Running every binary.
Checking that the packages using the updated package are building fine.
TODO: add commands
Sample template for a package update review
##### Reviewed points
- [ ] package name fits guidelines
- [ ] package version fits guidelines
- [ ] package build on ARCHITECTURE
- [ ] executables tested on ARCHITECTURE
- [ ] all depending packages build
##### Possible improvements
##### Comments
New packages
New packages are a common type of pull-requests. These pull requests consists in adding a new nix-expression for a package.
Reviewing process:
Add labels to the pull-request.
8.has: package (new) and any topic label that fit the new package.
Checking that the package versioning is fitting the guidelines.
Checking that the commit name is fitting the guidelines.
Checking that the meta field contains correct information.
License must be checked to be fitting upstream license.
Platforms should be set or the package will not get binary substitutes.
If there is no maintainer, propose the submitter to become the maintainer.
Checking that the code contains no typos.
Checking the package source.
Mirrors urls should be used when available.
The most appropriate function should be used (e.g. packages from github should use fetchFromGithub).
Building the package locally.
Running every binary.
Sample template for a new package review
##### Reviewed points
- [ ] package path fits guidelines
- [ ] package name fits guidelines
- [ ] package version fits guidelines
- [ ] package build on ARCHITECTURE
- [ ] executables tested on ARCHITECTURE
- [ ] `meta.description` is set and fits guidelines
- [ ] `meta.license` fits upstream license
- [ ] `meta.platforms` is set
- [ ] `meta.maintainers` is set
- [ ] build time only dependencies are declared in `nativeBuildInputs`
- [ ] source is fetched using the appropriate function
- [ ] phases are respected
- [ ] patches that are remotely available are fetched with `fetchPatch`
##### Possible improvements
##### Comments
Module updates
Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
Reviewing process
Add labels to the pull-request.
8.has: module (update) and any topic label that fit the module.
Checking that the module maintainers are notified.
Mention-bot notify github users based on the submitted changes, but it can happen that it miss some of the package maintainers.
Checking that the module tests, if any, are succeeding.
Checking that the introduced options are correct.
Type should be appropriate (string related types differs in their merging capabilities, optionSet and string types are deprecated).
Description, default and example should be provided.
Checking that option changes are backward compatible.
mkRenamedOptionModule and mkAliasOptionModule functions provide way to make option changes backward compatible.
Checking that removed options are declared with mkRemovedOptionModule
Checking that changes that are not backward compatible are mentioned in release notes.
Checking that documentations affected by the change is updated.
Sample template for a module update review
##### Reviewed points
- [ ] changes are backward compatible
- [ ] removed options are declared with `mkRemovedOptionModule`
- [ ] changes that are not backward compatible are documented in release notes
- [ ] module tests succeed on ARCHITECTURE
- [ ] options types are appropriate
- [ ] options description is set
- [ ] options example is provided
- [ ] documentation affected by the changes is updated
##### Possible improvements
##### Comments
New modules
New modules submissions introduce a new module to NixOS.
Add labels to the pull-request.
8.has: module (new) and any topic label that fit the module.
Checking that the module tests, if any, are succeeding.
Checking that the introduced options are correct.
Type should be appropriate (string related types differs in their merging capabilities, optionSet and string types are deprecated).
Description, default and example should be provided.
Checking that module meta field is present
Maintainers should be declared in meta.maintainers.
Module documentation should be declared with meta.doc.
Checking that the module respect other modules functionality.
For example, enabling a module should not open firewall ports by default.
Sample template for a new module review
##### Reviewed points
- [ ] module path fits the guidelines
- [ ] module tests succeed on ARCHITECTURE
- [ ] options have appropriate types
- [ ] options have default
- [ ] options have example
- [ ] options have descriptions
- [ ] No unneeded package is added to system.environmentPackages
- [ ] meta.maintainers is set
- [ ] module documentation is declared in meta.doc
##### Possible improvements
##### Comments
Other submissions
Other type of submissions requires different reviewing steps.
If you consider having enough knowledge and experience in a topic and would like to be a long-term reviewer for related submissions, please contact the current reviewers for that topic. They will give you information about the reviewing process.
The main reviewers for a topic can be hard to find as there is no list, but checking past pull-requests to see who reviewed or git-blaming the code to see who committed to that topic can give some hints.
Container system, boot system and library changes are some examples of the pull requests fitting this category.
Merging pull-requests
It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
TODO: add the procedure to request merging rights.