mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 17:14:00 +00:00
Revert "lib.types.string: Deprecation error instead of warning"
This reverts commitc59c6b1c57
. This was a bit too ambitious, because no warnings were previously triggered when `string` was nested e.g. `attrsOf string`, `nullOr string`, etc. Support for nested type deprecation warnings was introduced in4b54aedee5
, but had to be reverted ina36e6760e9
because it caused infinite recursion for some users, and I couldn't remember that it was reverted.
This commit is contained in:
parent
ec8866254a
commit
040b0ad3ed
@ -436,7 +436,10 @@ rec {
|
||||
|
||||
# Deprecated; should not be used because it quietly concatenates
|
||||
# strings, which is usually not what you want.
|
||||
string = throw "The type `types.string` is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.";
|
||||
string = separatedString "" // {
|
||||
name = "string";
|
||||
deprecationMessage = "See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.";
|
||||
};
|
||||
|
||||
passwdEntry = entryType: addCheck entryType (str: !(hasInfix ":" str || hasInfix "\n" str)) // {
|
||||
name = "passwdEntry ${entryType.name}";
|
||||
|
Loading…
Reference in New Issue
Block a user