nix flake update add deprecation warnings.#9449
nix flake update add deprecation warnings.#9449fricklerhandwerk merged 1 commit intoNixOS:masterfrom
nix flake update add deprecation warnings.#9449Conversation
I'm heading to bed, but I put one together about a month ago. I can send it over :). |
cole-h
left a comment
There was a problem hiding this comment.
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 <cole.e.helbling@outlook.com>
869b9b7 to
af00298
Compare
|
Oh please do @grahamc. I always greatly appreciate when someone else knocks an item off my to-do list. |
|
|
||
| addFlag({ | ||
| .longName = "recreate-lock-file", | ||
| .description = "Recreate the flake's lock file from scratch.", |
There was a problem hiding this comment.
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 INPUTcommand, guiding users towards the newernix flake update INPUTsyntax. 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-inputsyntax may not be aware of its deprecation and the transition to the newnix flake updatecommand. 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.