diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a1426bb2a0149..3c8b46a7d3ba5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -661,6 +661,15 @@ If you have any problems with formatting, please ping the [formatting team](http As an exception, an explicit conditional expression with null can be used when fixing a important bug without triggering a mass rebuild. If this is done a follow up pull request _should_ be created to change the code to `lib.optional(s)`. +- Certain [prelude + attributes](https://nix.dev/manual/nix/latest/language/builtins.html) should + explicitly use the `builtins` prefix, while others should conveniently omit + it: + + | Use `builtins` | Omit `builtins` | + |----------------|-----------------| + |
  • `builtins.abort`
  • `builtins.baseNameOf`
  • `builtins.break`
  • `builtins.derivation`
  • `builtins.derivationStrict`
  • `builtins.dirOf`
  • `builtins.false`
  • `builtins.fetchGit`
  • `builtins.fetchMercurial`
  • `builtins.fetchTarball`
  • `builtins.fetchTree`
  • `builtins.fromTOML`
  • `builtins.import`
  • `builtins.isNull`
  • `builtins.map`
  • `builtins.null`
  • `builtins.placeholder`
  • `builtins.removeAttrs`
  • `builtins.scopedImport`
  • `builtins.throw`
  • `builtins.toString`
  • `builtins.true`
  • |
  • `abort`
  • `baseNameOf`
  • `break`
  • `derivation`
  • `derivationStrict`
  • `dirOf`
  • `false`
  • `fetchGit`
  • `fetchMercurial`
  • `fetchTarball`
  • `fetchTree`
  • `fromTOML`
  • `import`
  • `isNull`
  • `map`
  • `null`
  • `placeholder`
  • `removeAttrs`
  • `scopedImport`
  • `throw`
  • `toString`
  • `true`
  • | + - Any style choices not covered here but that can be expressed as general rules should be left at the discretion of the authors of changes and _not_ commented in reviews. The purpose of this is: - to avoid churn as contributors with different style preferences undo each other's changes,