Merge pull request #247848 from infinisil/deprecate-lib.types.string

lib.types.string: Deprecation error instead of warning
This commit is contained in:
Robert Hensing 2023-08-08 11:50:29 +02:00 committed by GitHub
commit 69d4b019e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -436,10 +436,7 @@ rec {
# Deprecated; should not be used because it quietly concatenates
# strings, which is usually not what you want.
string = separatedString "" // {
name = "string";
deprecationMessage = "See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.";
};
string = throw "The type `types.string` is deprecated. 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}";