Skip to content

Rename nix profile install to nix profile add #24

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

Merged
merged 3 commits into from
Apr 10, 2025

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Apr 5, 2025

Motivation

The verb add is a better antonym for the verb remove. Nix also does not have install hooks or general behavior often associated with "installing".

Context

I've had (and heard) concerns before about add/remove vs. install/remove confusion. Sharing the video about the git add video fix had Carl Hedgren suggesting it on Twitter.

@grahamc grahamc requested a review from edolstra as a code owner April 5, 2025 22:57
@grahamc grahamc marked this pull request as draft April 5, 2025 22:58
@grahamc grahamc force-pushed the rename-nix-profile-install-to-add branch from 9ecb8ff to 0e8a13a Compare April 5, 2025 23:01
@grahamc grahamc force-pushed the rename-nix-profile-install-to-add branch from 0e8a13a to 7b0d72e Compare April 6, 2025 19:12
Copy link

github-actions bot commented Apr 6, 2025

@github-actions github-actions bot temporarily deployed to pull request April 6, 2025 19:18 Inactive
@edolstra
Copy link
Collaborator

edolstra commented Apr 7, 2025

This PR is hard to review with the formatting changes.

Base automatically changed from sync-2.28.0 to detsys-main April 7, 2025 12:58
@grahamc grahamc force-pushed the rename-nix-profile-install-to-add branch from 7b0d72e to b454ae9 Compare April 7, 2025 13:20
@grahamc
Copy link
Member Author

grahamc commented Apr 7, 2025

@edolstra fixed!

@grahamc grahamc force-pushed the rename-nix-profile-install-to-add branch from b454ae9 to 8443f01 Compare April 7, 2025 13:23
@grahamc grahamc marked this pull request as ready for review April 7, 2025 13:28
@github-actions github-actions bot temporarily deployed to pull request April 7, 2025 13:29 Inactive
{"remove", []() { return make_ref<CmdProfileRemove>(); }},
{"upgrade", []() { return make_ref<CmdProfileUpgrade>(); }},
{"list", []() { return make_ref<CmdProfileList>(); }},
{"diff-closures", []() { return make_ref<CmdProfileDiffClosures>(); }},
{"history", []() { return make_ref<CmdProfileHistory>(); }},
{"rollback", []() { return make_ref<CmdProfileRollback>(); }},
{"wipe-history", []() { return make_ref<CmdProfileWipeHistory>(); }},
// 2025-04-05 Deprecated in favor of "add"
{"install", []() { return make_ref<CmdProfileAdd>(); }},
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's better to do this as a proper alias (see aliases in main.cc), otherwise nix profile install shows up as its own manual page which is probably not what we want. However aliases currently only handles top-level commands I think.

Copy link
Member Author

@grahamc grahamc Apr 7, 2025

Choose a reason for hiding this comment

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

Yeah, it does only handle top-level commands at the moment. That'd be a great thing to fix.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@grahamc Okay, I've made it a proper alias.

@edolstra edolstra changed the title Rename nix profile install to nix profile add. Rename nix profile install to nix profile add Apr 9, 2025
This allows subcommands to declare aliases, e.g. `nix store ping` is
now a proper alias of `nix store info`.
@edolstra edolstra force-pushed the rename-nix-profile-install-to-add branch from 1fa9b5a to 497fe6d Compare April 10, 2025 16:52
@github-actions github-actions bot temporarily deployed to pull request April 10, 2025 16:58 Inactive
@grahamc grahamc added this pull request to the merge queue Apr 10, 2025
Merged via the queue into detsys-main with commit 02da540 Apr 10, 2025
25 checks passed
@grahamc grahamc deleted the rename-nix-profile-install-to-add branch April 10, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants