Skip to content

treewide: remove unused with statements from maintainer lists#330664

Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom
Mic92:empty-with
Jul 29, 2024
Merged

treewide: remove unused with statements from maintainer lists#330664
Aleksanaa merged 1 commit intoNixOS:masterfrom
Mic92:empty-with

Conversation

@Mic92
Copy link
Member

@Mic92 Mic92 commented Jul 28, 2024

$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'

nixf-tidy complaints now about empty maintainers set.

Description of changes

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.

@github-actions github-actions bot added 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: qt/kde Object-oriented framework for GUI creation 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: emacs Text editor 6.topic: printing Drivers, CUPS & Co. 6.topic: vim Advanced text editor 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab 6.topic: php PHP is a general-purpose scripting language geared towards web development. labels Jul 28, 2024
@Mic92 Mic92 removed the request for review from NickCao July 28, 2024 14:51
Copy link

@nixf-tidy-review nixf-tidy-review left a comment

Choose a reason for hiding this comment

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

✅ Looks good!

@Aleksanaa
Copy link
Member

Thanks! Btw there's a : after your commit message, and better to use treewide instead of tree-wide in case someone is writing a script to filter commit history or something

@drupol drupol added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 28, 2024
@drupol drupol changed the title tree-wide: remove unused with statements from maintainer lists: treewide: remove unused with statements from maintainer lists Jul 28, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Jul 28, 2024
@Mic92 Mic92 force-pushed the empty-with branch 2 times, most recently from 6b35a80 to 397bdf7 Compare July 28, 2024 18:19
@Mic92
Copy link
Member Author

Mic92 commented Jul 28, 2024

Thanks! Btw there's a : after your commit message, and better to use treewide instead of tree-wide in case someone is writing a script to filter commit history or something

Done

@Aleksanaa
Copy link
Member

I'll revisit after 1 hour

$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'
@Aleksanaa Aleksanaa merged commit a07da97 into NixOS:master Jul 29, 2024
@piegamesde
Copy link
Member

What's the value of removing these besides "shush the linter"? Given that we want packages ideally to have maintainers anyways, I'd argue that keeping these around might be worthwhile? They probably also don't hurt performance, or at the very least could easily be optimized away to have no performance impact.

I'd argue that the linter is wrong to complain about cases like these, and should distinguish from other cases I'd consider as valid, like unused with lib; for example. (Specifically, I'd draw the line at "an unused with is fine if it's scoped only to an empty list")

@Mic92 Mic92 deleted the empty-with branch July 30, 2024 09:08
@SuperSandro2000
Copy link
Member

Just found another PR where the linter was a bit on the annoying side https://github.com/NixOS/nixpkgs/pull/331017/files#diff-d6928320a2c1b49a1351902a0e9683ed7f05d63fe6cdef002e4c8d365d322c13R7-R11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: php PHP is a general-purpose scripting language geared towards web development. 6.topic: printing Drivers, CUPS & Co. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: vim Advanced text editor 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants