lib/types: types deprecate functor.wrapped in favor of functor.payload.elemType for trivial cases#375084
Merged
infinisil merged 4 commits intoNixOS:masterfrom Mar 20, 2025
Merged
Conversation
ff20220 to
fcc9155
Compare
infinisil
reviewed
Feb 17, 2025
1 task
…functor.payload.elemType
….payload.elemType
…ctor.payload.elemType
…tor.payload.elemType
infinisil
approved these changes
Mar 20, 2025
Member
infinisil
left a comment
There was a problem hiding this comment.
Reviewed together, looking good!
alfarelcynthesis
added a commit
to alfarelcynthesis/nvf
that referenced
this pull request
Sep 27, 2025
This is the more modern approach: NixOS/nixpkgs#375084 The above PR does this for similar cases in nixpkgs. This fixes a warning that shows up when using the lib in weird ways: ``` trace: evaluation warning: The deprecated `functor.wrapped` attribute is accessed, use `nestedTypes.elemType` instead. ``` The warning is thrown by the module system when merging types (at least in some cases). It shouldn't be exposed at all in the current codebase.
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following types now use
functor.payload.elemTypeacessingfunctor.wrappedwill from now on show a warning.lib.types.uniqueandlib.types.uniqlib.types.nullOrlib.types.functionTolib.types.coercedToThings done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.