Skip to content

Commit b93299c

Browse files
committed
docs/CONTRIBUTING: document deprecating options
1 parent f8c4eb4 commit b93299c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
[documentation on reviewing PRs]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request
88
[Core Principles]: #core-principles
99
[REVIEWING.md]: ./REVIEWING.md
10+
[deprecations.nix]: ./modules/collection/deprecations.nix
11+
[ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601
1012

1113
Hjem Rum (or HJR) is always in need of contributions as a module collection. As
1214
programs are developed, modules will need to be added, changed, removed, etc.,
@@ -369,6 +371,19 @@ Additionally, please follow how lib is structured in nixpkgs. For example, the
369371
custom function `attrsNamesHasPrefix` is under `attrsets` to signify that it
370372
operates on an attrset, just like in nixpkgs.
371373

374+
### Deprecating options
375+
376+
Sometimes, you will have to deprecate an option (if it was renamed or removed).
377+
This is done within [deprecations.nix], and needs to be centralized there.
378+
379+
Additionally, we require deprecations to be given a date, which you can do with
380+
the `mkRenamedOptionUntil` option, which takes the same parameters as
381+
`mkRenamedOption` as well as an [ISO 8601] date which is added to the warning
382+
message.
383+
384+
The baseline for deprecations is 3 months from when the PR was made, but this
385+
can be made longer if needed (eg. for a widely used/critical option).
386+
372387
### Docs
373388

374389
WIP

0 commit comments

Comments
 (0)