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: init {types.attrsWith} #354738

Merged
merged 6 commits into from
Dec 2, 2024
Merged

Conversation

hsjobeki
Copy link
Contributor

@hsjobeki hsjobeki commented Nov 9, 2024

types.attrsWith combines attrsOf and lazyAttrsOf with a configurable lazy = true/false parameter.

Other parameters are possible and on hold see: #344216

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

lib/types.nix Outdated Show resolved Hide resolved
@infinisil
Copy link
Member

@hsjobeki Btw the "Co-Authored-By: @hsjobeki" doesn't appear to work :P

@hsjobeki
Copy link
Contributor Author

@infinisil Depraction message works now. With/without type merging.

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.

Looked at this together in a meeting with @hsjobeki, looking good, let's deal with any issues if they come up!

@infinisil infinisil merged commit 23a7a7d into NixOS:master Dec 2, 2024
16 of 17 checks passed
@kachick kachick mentioned this pull request Dec 3, 2024
13 tasks
@paparodeo
Copy link
Contributor

this change seems like it broke one of the ofborg eval tests.

nix-build --arg pkgs 'import ./. {}' ./lib/tests/release.nix

https://gist.github.com/GrahamcOfBorg/7d1ce79b712e477612915ee9247188c8

@K900
Copy link
Contributor

K900 commented Dec 3, 2024

So do we revert this or does anyone have a quick fix?

@K900
Copy link
Contributor

K900 commented Dec 3, 2024

Reverted.

@Mic92
Copy link
Member

Mic92 commented Dec 3, 2024

We will add lib-tests soon to github ci.

@hsjobeki
Copy link
Contributor Author

hsjobeki commented Dec 3, 2024

@infinisil @K900 Please just remove the failing test line. It was only there for testing the "nice" deprecation message. But it seems the test framework cannot handle that yet.

I would need to first fix the test framework. Which is a bit more work.

I am not sure what the convention is for reverting a revert but i opened up this one:

#361391

@Mic92
Copy link
Member

Mic92 commented Dec 3, 2024

The convention is to revert the revert and than potentially fix the issue.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/use-cases-of-option-type-internals/57317/1

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 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants