You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case the numeric identifier in nix profile shifts with every change of the profile. In this case the user intended to remove vim and cowsay, but instead removed vim and nano. Very confusing.
The identifier in nix profile should be stable. It is probably up for debate what that should be.
The text was updated successfully, but these errors were encountered:
This has been partly fixed by #8678. The commands now use a name which is inferred from installables (flake uris). This makes this issue significantly less problematic, but it still can occur.
Installing 2 different packages using 2 different flake uris that infer to the same name will cause the problem to occur.
For example installing github:NixOS/nixpkgs#cowsay and github:NixOS/nixpkgs/nixpkgs-unstable#cowsay will result in cowsay and cowsay-2 entries in nix profile. Removing cowsay will implicitly rename cowsay-2 to cowsay.
To make this stable, it shouldn't be possible to install 2 installables that infer to the same name. Or the names should be stored, so that entries do not appear to implicitly rename.
The first option seems most reliable and intuitive, so solving #5587 will solve this issue as well. I'll close this one.
The main identifier for package entries in Nix profiles is the index. The index is quite bad as an identifier. Consider the following scenario:
In this case the numeric identifier in
nix profile
shifts with every change of the profile. In this case the user intended to removevim
andcowsay
, but instead removedvim
andnano
. Very confusing.The identifier in
nix profile
should be stable. It is probably up for debate what that should be.The text was updated successfully, but these errors were encountered: