chore: iron out cli flag usage#4322
Conversation
|
Instead of removing flags, wouldn't it make more sense to hide them, add deprecation warnings and only remove them in a few releases from now? |
@ruben-arts and I discussed this one further. |
|
@Hofer-Julian that will be the case for But we just did a quick github search for |
ruben-arts
left a comment
There was a problem hiding this comment.
One nitpick, I would even go as far as making it hidden.
Co-authored-by: Ruben Arts <ruben@prefix.dev>
ruben-arts
left a comment
There was a problem hiding this comment.
Such a nice improvement!
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
…uilt-in commands) (prefix-dev#4307) Co-authored-by: nichmor <nmorkotilo@gmail.com>
This will iron-out how some of the CLI flags work as they were wildly inconsistent:
CLI Changes
This PR:
--no-lockfile-updateas it was inconsistent across commands--no-installin a few missing places (w.r.t PyPI installs causing conda prefix installs)--revalidatebecause in multiple context the CLI flag was present but unused. Basically ignored. And we are going to refactor the inverse of--revalidate, which is the default forrun,shellandshell-hookanyways as it now does not work for source dependencies.pixi removeandpixi addconsistent.What happens when
--no-lockfile-updateis used?As mentioned above using the
--no-lockfile-updatewill error with the following:Fixed/modified behavior
This also changes the behavior that you can run
--no-install, and with a combination of--frozeneverywhere that it makes sense.This will ensure that you can run in the environment as it currently is. And consequently that the behavior of
--no-lockfile-update(as it was originally intended) can be replicated and, more importantly, actually works.We will add a shorthand for this in a subsequent PR because this has proved useful in source build contexts. Probably something like
--as-is.I found a number of commands, e.g
runthat would update the environment even though--no-installwas specified. This has also been fixed.What has been tested?
--frozen,--no-install. And b) also checks if we are missing any commands in that test that use those CLI flags.pixi addcorrectly modify the pixi.toml even when it doesn't do any solving + installing, when those flags are used.Table of changes
Change Types
--revalidateflag +--no-lockfile-updatedeprecated with error message--no-lockfile-updatedeprecated + Added--no-installflag--no-installflag onlypixi addpixi removepixi import--frozen,--lockedbecause these flags were unused, this was the defaultpixi runpixi shellpixi shell-hookpixi upgradepixi workspace channel addpixi workspace channel removepixi listpixi treepixi workspace export conda-explicit-specpixi lockUnchanged Commands
pixi authpixi auth loginpixi auth logoutpixi buildpixi cleanpixi clean cachepixi completionpixi configpixi config editpixi config listpixi config prependpixi config appendpixi config setpixi config unsetpixi execpixi globalpixi global addpixi global editpixi global installpixi global uninstallpixi global removepixi global listpixi global syncpixi global exposepixi global expose addpixi global expose removepixi global shortcutpixi global shortcut addpixi global shortcut removepixi global updatepixi global upgradepixi global upgrade-allpixi infopixi initpixi installpixi reinstallpixi searchpixi self-updatepixi taskpixi task addpixi task removepixi task aliaspixi task listpixi updatepixi uploadpixi workspacepixi workspace channelpixi workspace channel listpixi workspace descriptionpixi workspace description getpixi workspace description setpixi workspace platformpixi workspace platform addpixi workspace platform listpixi workspace platform removepixi workspace versionpixi workspace version getpixi workspace version setpixi workspace version majorpixi workspace version minorpixi workspace version patchpixi workspace environmentpixi workspace environment addpixi workspace environment listpixi workspace environment removepixi workspace exportpixi workspace export conda-environmentpixi workspace namepixi workspace name getpixi workspace name setpixi workspace system-requirementspixi workspace system-requirements addpixi workspace system-requirements listpixi workspace requires-pixipixi workspace requires-pixi getpixi workspace requires-pixi setpixi workspace requires-pixi unsetpixi workspace requires-pixi verify