lib/types: standardise attrsOf functor.wrapped warning and add a test

This commit is contained in:
Silvan Mosberger
2024-12-02 16:08:59 +01:00
committed by Johannes Kirschbauer
parent dbb085549e
commit e60e2e6916
2 changed files with 6 additions and 6 deletions

View File

@@ -636,12 +636,8 @@ rec {
substSubModules = m: attrsWith { elemType = elemType.substSubModules m; inherit lazy; };
functor = defaultFunctor "attrsWith" // {
wrappedDeprecationMessage = { loc }: lib.warn ''
Using 'functor.wrapped' on option types will be deprecated.
Use 'nestedTypes.elemType' instead.
option: '${showOption loc}'
'' elemType;
The deprecated `type.functor.wrapped` attribute of the option `${showOption loc}` is accessed, use `type.nestedTypes.elemType` instead.
'' elemType;
payload = {
# Important!: Add new function attributes here in case of future changes
inherit elemType lazy;