-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
nix flake update
add deprecation warnings.
#9449
nix flake update
add deprecation warnings.
#9449
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
(Note for future work) We really need to have some sort of of "deprecated features" which is the dual of "experimental features" to keep track of this stuff.
I'm heading to bed, but I put one together about a month ago. I can send it over :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple wording nits, feel free to take or leave them
This builds on NixOS#8817, to add additional UX help for people with existing muscle memory (or shell history) with --update-input and tries to gently guide them towards the newly evolved CLI UI. Co-authored-by: Cole Helbling <[email protected]>
869b9b7
to
af00298
Compare
Oh please do @grahamc. I always greatly appreciate when someone else knocks an item off my to-do list. |
@@ -47,6 +47,16 @@ MixFlakeOptions::MixFlakeOptions() | |||
{ | |||
auto category = "Common flake-related options"; | |||
|
|||
addFlag({ | |||
.longName = "recreate-lock-file", | |||
.description = "Recreate the flake's lock file from scratch.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also show up in documentation.
.description = "Recreate the flake's lock file from scratch.", | |
.description = R"( | |
Recreate the flake's lock file from scratch. | |
> **DEPRECATED** | |
> | |
> Use [`nix flake update`](@docroot@/command-ref/new-cli/nix3-flake-update.md) instead. | |
)", |
Not sure about syntax and if the link is exactly right, but something along these lines.
Successfully created backport PR for |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-11-27-nix-team-meeting-minutes-107/36112/1 |
This builds on #8817, to add additional UX help for people with existing muscle memory (or shell history) with --update-input and tries to gently guide them towards the newly evolved CLI UI.
Motivation
This change introduces a deprecation warning for the
nix flake lock --update-input INPUT
command, guiding users towards the newernix flake update INPUT
syntax. The motivation is to enhance user experience by providing clear and helpful guidance when encountering deprecated commands. This change aligns with our ongoing efforts to streamline Nix commands and improve their intuitiveness and ease of use.Context
Many users familiar with the older
nix flake lock --update-input
syntax may not be aware of its deprecation and the transition to the newnix flake update
command. The current behavior, which results in an unrecognised flag error, can be confusing and does not guide users towards the correct command. By introducing a deprecation warning, we provide a more user-friendly approach, aiding in a smoother transition to the updated syntax.Example
Before:
After:
Priorities
Add 👍 to pull requests you find important.