From 6d2142f846255c3efad9387b3545648320bf3620 Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Thu, 11 Apr 2024 12:02:38 +0200 Subject: [PATCH 1/2] docs: fix frozen install help --- docs/reference/cli.md | 13 +++++++------ src/cli/mod.rs | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/reference/cli.md b/docs/reference/cli.md index ed4be8480..f498bc73c 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -89,9 +89,10 @@ Installs all dependencies specified in the lockfile `pixi.lock`. Which gets generated on `pixi add` or when you manually change the [manifest file](configuration.md) file and run `pixi install`. ##### Options + /// Install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. ```shell @@ -128,7 +129,7 @@ You cannot run `pixi run source setup.bash` as `source` is not available in the ##### Options - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to run the task in, if none are provided the default environment will be used or a selector will be given to select the right environment. @@ -328,7 +329,7 @@ List project's packages. Highlighted packages are explicit dependencies. - `--sort-by `: Sorting strategy [default: name] [possible values: size, name, type] - `--manifest-path `: The path to [manifest file](configuration.md), by default it searches for one in the parent directories. - `--environment (-e)`: The environment's packages to list, if non is provided the default environment's packages will be listed. -- `--frozen`: Install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: Only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--no-install`: Don't install the environment for pypi solving, only update the lock-file if it can solve without installing. (Implied by `--frozen` and `--locked`) @@ -387,7 +388,7 @@ The package tree can also be inverted (`-i`), to see which packages require a sp - `--platform (-p)`: The platform to list packages for. Defaults to the current platform - `--manifest-path `: The path to [manifest file](configuration.md), by default it searches for one in the parent directories. - `--environment (-e)`: The environment's packages to list, if non is provided the default environment's packages will be listed. -- `--frozen`: Install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: Only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--no-install`: Don't install the environment for pypi solving, only update the lock-file if it can solve without installing. (Implied by `--frozen` and `--locked`) @@ -497,7 +498,7 @@ To exit the pixi shell, simply run `exit`. ##### Options - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to activate the shell in, if none are provided the default environment will be used or a selector will be given to select the right environment. @@ -523,7 +524,7 @@ This command prints the activation script of an environment. - `--shell (-s)`: The shell for which the activation script should be printed. Defaults to the current shell. Currently supported variants: [`bash`, `zsh`, `xonsh`, `cmd`, `powershell`, `fish`, `nushell`] - `--manifest-path`: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to activate, if none are provided the default environment will be used or a selector will be given to select the right environment. diff --git a/src/cli/mod.rs b/src/cli/mod.rs index b6af619ac..56af9528b 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -89,10 +89,10 @@ pub enum Command { #[group(multiple = false)] /// Lock file usage from the CLI pub struct LockFileUsageArgs { - /// Don't check or update the lockfile, continue with previously installed environment. + /// Install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. #[clap(long, conflicts_with = "locked", env = "PIXI_FROZEN")] pub frozen: bool, - /// Check if lockfile is up to date, aborts when lockfile isn't up to date with the manifest file. + /// Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file. #[clap(long, conflicts_with = "frozen", env = "PIXI_LOCKED")] pub locked: bool, } @@ -113,7 +113,7 @@ pub async fn execute() -> miette::Result<()> { let args = Args::parse(); let use_colors = use_color_output(&args); - // Setup the default miette handler based on whether or not we want colors or not. + // Set up the default miette handler based on whether we want colors or not. miette::set_hook(Box::new(move |_| { Box::new( miette::MietteHandlerOpts::default() @@ -196,7 +196,7 @@ pub async fn execute() -> miette::Result<()> { .into_diagnostic()?, ); - // Setup the tracing subscriber + // Set up the tracing subscriber let fmt_layer = tracing_subscriber::fmt::layer() .with_ansi(use_colors) .with_writer(IndicatifWriter::new(progress::global_multi_progress())) From 6b3f6705106c092a0d4f3ff8a113f952b75d9c3b Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Thu, 11 Apr 2024 13:40:00 +0200 Subject: [PATCH 2/2] docs: improve frozen explanation --- docs/reference/cli.md | 12 ++++++------ src/cli/mod.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/reference/cli.md b/docs/reference/cli.md index f498bc73c..53d4c8881 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -92,7 +92,7 @@ Which gets generated on `pixi add` or when you manually change the [manifest fil /// Install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. ```shell @@ -129,7 +129,7 @@ You cannot run `pixi run source setup.bash` as `source` is not available in the ##### Options - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to run the task in, if none are provided the default environment will be used or a selector will be given to select the right environment. @@ -329,7 +329,7 @@ List project's packages. Highlighted packages are explicit dependencies. - `--sort-by `: Sorting strategy [default: name] [possible values: size, name, type] - `--manifest-path `: The path to [manifest file](configuration.md), by default it searches for one in the parent directories. - `--environment (-e)`: The environment's packages to list, if non is provided the default environment's packages will be listed. -- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: Only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--no-install`: Don't install the environment for pypi solving, only update the lock-file if it can solve without installing. (Implied by `--frozen` and `--locked`) @@ -388,7 +388,7 @@ The package tree can also be inverted (`-i`), to see which packages require a sp - `--platform (-p)`: The platform to list packages for. Defaults to the current platform - `--manifest-path `: The path to [manifest file](configuration.md), by default it searches for one in the parent directories. - `--environment (-e)`: The environment's packages to list, if non is provided the default environment's packages will be listed. -- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: Only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--no-install`: Don't install the environment for pypi solving, only update the lock-file if it can solve without installing. (Implied by `--frozen` and `--locked`) @@ -498,7 +498,7 @@ To exit the pixi shell, simply run `exit`. ##### Options - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to activate the shell in, if none are provided the default environment will be used or a selector will be given to select the right environment. @@ -524,7 +524,7 @@ This command prints the activation script of an environment. - `--shell (-s)`: The shell for which the activation script should be printed. Defaults to the current shell. Currently supported variants: [`bash`, `zsh`, `xonsh`, `cmd`, `powershell`, `fish`, `nushell`] - `--manifest-path`: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to activate, if none are provided the default environment will be used or a selector will be given to select the right environment. diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 56af9528b..13d41a1fb 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -89,7 +89,7 @@ pub enum Command { #[group(multiple = false)] /// Lock file usage from the CLI pub struct LockFileUsageArgs { - /// Install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. + // Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file. #[clap(long, conflicts_with = "locked", env = "PIXI_FROZEN")] pub frozen: bool, /// Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file.