Skip to content

DOC: Instructions to install pixi from source left me with an old version #5365

@crusaderky

Description

@crusaderky

README.md mentions:

pixi/README.md

Lines 195 to 202 in 620cedb

## Build/install from source
`pixi` is 100% written in Rust and therefore it can be installed, built and tested with cargo.
To start using `pixi` from a source build run:
```shell
cargo install --locked --git https://github.com/prefix-dev/pixi.git pixi
```

However, the instructions can be misleading, as the user can be led into thinking that they replace global pixi installation. They do not:

$ curl -fsSL https://pixi.sh/install.sh | sh
$ grep pixi ~/.bashrc
export PATH="/home/crusaderky/.pixi/bin:$PATH"
# Reload terminal
$ pixi self-update --version 0.62.2
$ pixi --version
pixi 0.62.2
$ cargo install --locked --git https://github.com/prefix-dev/pixi.git pixi
    Updating git repository `https://github.com/prefix-dev/pixi.git`
  Installing pixi v0.63.2 (https://github.com/prefix-dev/pixi.git#620cedb0)  # Looks good...
[...]
   Compiling pixi v0.63.2 (/home/crusaderky/.cargo/git/checkouts/pixi-46a49aba5c5e046f/620cedb/crates/pixi)  # Looks good...
    Finished `release` profile [optimized] target(s) in 2m 27s
   Replacing /home/crusaderky/.cargo/bin/pixi  # Should have read the fine print here!
    Replaced package `pixi v0.63.2 (https://github.com/prefix-dev/pixi.git#7a53925d)` with `pixi v0.63.2 (https://github.com/prefix-dev/pixi.git#620cedb0)` (executable `pixi`)
$ pixi --version
pixi 0.62.2  # What happened?
$ which pixi
/home/crusaderky/.pixi/bin/pixi
$ /home/crusaderky/.cargo/bin/pixi  --version
pixi 0.63.2

In the above snippet, I downgraded pixi to an older version just to highlight the problem. However, when this first happened, I had the latest released version (0.63.2 in the example) installed in ~/.pixi, so pixi --version was not informing me I was doing anything wrong.

I personally wasted a few hours (plus hours from the devs) trying to figure out why a PR was not delivering what it was meant to -- because I was still unknowingly using the latest release.

Proposed solution

  1. Update README.md to highlight that cargo install does not overwrite the global pixi!
  2. Consider switching to SCM versioning so that it becomes unambiguous which version of pixi you're running. Failing that, consider auto-appending .dev0 to the version when building from sources and not from a tag.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions