Skip to content

Advise against direct use of builtins in docs #13288

@roberth

Description

@roberth

Problem

Changing the behavior of builtins is risky to impossible, as we promise to evaluate reproducibly over time.
(that's without language versioning, which is hard to pull off in any kind of friendly, robust way EDIT: and which would be detrimental to the ecosystem due to opportunity cost)

Proposal

Nixpkgs lib and possibly alternative libraries extend and improve the builtins.

  • Recommend to use those functions whenever possible.
    This also settles the question: should I use builtins or lib? Always lib. It's better.
  • Highlight known differences between builtins and Nixpkgs lib. A worthwhile layering violation.

Checklist

Context


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

Labels

documentationidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions