[RFC] types.listOf: actually validate the contents#168295
[RFC] types.listOf: actually validate the contents#168295K900 wants to merge 5 commits intoNixOS:masterfrom K900:list-of-actual-things
Conversation
|
This will probably break things. Things that are broken by this probably deserve it. |
|
@K900 thanks for resolving this! It was driving me mad! |
|
For context, @Deep-Six was hitting a completely inscrutable error after doing |
|
Aww, this is all I get from nixpkgs-review: Result of 1 package blacklisted:
I think it'll only be in the modules, which probably requires running (some) nixos tests. Anyway, +1 from me, seems like a good idea to check this. |
This actually works if the value is an attrset.
Just to fix things quicker for now
|
The comment saying check-meta should be enabled "soon" is from 2017... Right now I've enabled it just to see more things fail (or not?), but maybe it should stay that way? CC @copumpkin who wrote the original comment all those years ago. |
|
OK, so it turns out the validation does work correctly here, the problem is with |
|
In error messages, we shouldn't enter more than two layers of attrsets and/or lists, to avoid infinite recursions and to avoid some unnecessarily large messages. |
|
Yes, that is what happened. I've submitted a fix (ish) for toPretty in #168327 |
Description of changes
This is a footgun. Remove the footgun. I solemnly swear to do my best to deal with the inevitable fallout.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes