Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/types: types deprecate functor.wrapped in favor of functor.payload.elemType for trivial cases #375084

Merged
merged 4 commits into from
Mar 20, 2025

Conversation

hsjobeki
Copy link
Contributor

@hsjobeki hsjobeki commented Jan 19, 2025

  • As part of removing functor.wrapped in the long term. This PR deprecates it for some trivial cases
  • Added release notes

The following types now use functor.payload.elemType acessing functor.wrapped will from now on show a warning.

  • lib.types.unique and lib.types.uniq
  • lib.types.nullOr
  • lib.types.functionTo
  • lib.types.coercedTo

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@hsjobeki hsjobeki requested a review from infinisil January 19, 2025 15:17
@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 6.topic: module system About "NixOS" module system internals 6.topic: lib The Nixpkgs function library labels Jan 19, 2025
@nix-owners nix-owners bot requested a review from roberth January 19, 2025 15:18
@hsjobeki hsjobeki changed the title lib/types: types.{unique,uniq} deprecate functor.wrapped in favor of functor.payload.elemType lib/types: types deprecate functor.wrapped in favor of functor.payload.elemType for trivial cases Jan 19, 2025
Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(reviewed together in a meeting) This is good with a bit more testing, see #382856

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed together, looking good!

@infinisil infinisil merged commit 987a096 into NixOS:master Mar 20, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: lib The Nixpkgs function library 6.topic: module system About "NixOS" module system internals 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants