Skip to content

Commit

Permalink
release-notes: add deprecation note: funtor.wrapped for lib.types.att…
Browse files Browse the repository at this point in the history
…rsWith
  • Loading branch information
hsjobeki committed Jan 6, 2025
1 parent 3d92f38 commit 3a462fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
"sec-nixpkgs-release-25.05-lib-breaking": [
"release-notes.html#sec-nixpkgs-release-25.05-lib-breaking"
],
"sec-nixpkgs-release-25.05-lib-deprecations": [
"release-notes.html#sec-nixpkgs-release-25.05-lib-deprecations"
],
"sec-overlays-install": [
"index.html#sec-overlays-install"
],
Expand Down
6 changes: 6 additions & 0 deletions doc/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@
- Structure of the `functor` of some types has changed. `functor` is an implementation detail and should not be relied upon. If you did rely on it let us know in this [PR](https://github.com/NixOS/nixpkgs/pull/363565).
- [`lib.types.enum`](https://nixos.org/manual/nixos/unstable/#sec-option-types-basic): Previously the `functor.payload` was the list of enum values directly. Now it is an attribute set containing the values in the `values` attribute.
- [`lib.types.separatedString`](https://nixos.org/manual/nixos/unstable/#sec-option-types-string): Previously the `functor.payload` was the seperator directly. Now it is an attribute set containing the seperator in the `sep` attribute.

### Deprecations {#sec-nixpkgs-release-25.05-lib-deprecations}

`functor` is an implementation detail and should not be relied upon, but since its status wasn't clear and it has had some use cases without alternatives, changes are being handled as gracefully as possible. Deprecations within functor:
- `functor.wrapped` is now deprecated for some types and using it will give a warning with migration instructions. It is deprecated for these types:
- `lib.types.attrsWith`

0 comments on commit 3a462fe

Please sign in to comment.