Skip to content

lib.attrsToListRecursive: init#416113

Closed
nukdokplex wants to merge 1 commit intoNixOS:masterfrom
nukdokplex:lib.attrsToListRecursive
Closed

lib.attrsToListRecursive: init#416113
nukdokplex wants to merge 1 commit intoNixOS:masterfrom
nukdokplex:lib.attrsToListRecursive

Conversation

@nukdokplex
Copy link
Contributor

@nukdokplex nukdokplex commented Jun 12, 2025

Added lib.attrsets.attrsToListRecursive and lib.attrsets.attrsToListRecursive' and their aliases in root. For further details please check corresponding docstrings.


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: lib The Nixpkgs function library label Jun 12, 2025
@nix-owners nix-owners bot requested review from hsjobeki and infinisil June 12, 2025 11:21
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 12, 2025
@nukdokplex nukdokplex self-assigned this Jun 27, 2025
@nukdokplex nukdokplex requested review from balsoft and roberth June 28, 2025 10:23
@roberth
Copy link
Member

roberth commented Jul 1, 2025

This approach was used in the module system for processing the options and it causes unnecessary strictness (worse performance, more errors).
So accepting this runs a risk of making the wrong thing easier.

If we do accept it, which I don't think I would recommend, the function(s) could probably be generalized a bit, and be made to look more like the *With functions we already have, where we take a function to determine the boundary of the recursive structure. The argument (x: x == { }) would then make it behave like attrsToListRecursive' as currently specified in this PR.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5706

@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 26, 2025
@nukdokplex
Copy link
Contributor Author

closing cause similar pr #395160 resolved

@nukdokplex nukdokplex closed this Sep 12, 2025
@nukdokplex nukdokplex deleted the lib.attrsToListRecursive branch September 27, 2025 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: lib The Nixpkgs function library 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants