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
Thanks for nix-tree! It's great. I love these tools that take advantage of all the great information available from the Nix packaging system.
One thing I'd really like to use nix-tree for is to help better understand file collisions (in particular, when building Python environments).
From time to time I accidentally build a Python environment that includes two derivations of the same Python package. Sometimes this is because two upstream versions of the Python package are being included but more often the upstream version is the same and something about the Nix derivation has changed (eg, versions of dependencies).
If I use nix-tree to inspect this situation then I don't learn much because nix-tree convenient chops off the output hash portion of the store object name. Thus, I see that my Python environment includes "python3.7-autobahn-21.3.1.drv" and "python3.7-autobahn-21.3.1.drv".
It would be great if I could tell these apart in nix-tree. Perhaps if nix-tree notices there are duplicates after constructing the short versions of the names, it could append the minimum hash prefix necessary to disambiguate? For example, if one python3.7-autobahn-21.3.1.drv has an output path of /nix/store/z7zhlhp2jqiza7kwa3kdbw7vvd918gyz-python3.7-autobahn-21.3.1 and the other has an output path of /nix/store/z86hmnd5hiyqy4y2p96macy2v6qz84bn-python3.7-autobahn-21.3.1 then they could be displayed in nix-tree as "python3.7-autobahn-21.3.1.drv (z7)" and "python3.7-autobahn-21.3.1.drv (z8)".
The text was updated successfully, but these errors were encountered:
I realized I mixed up output hashes and derivation hashes in my suggestion about. I'm not sure which would be more useful, really, but I guess using the derivation hash rather than the output hash would probably be less surprising.
Perhaps if nix-tree notices there are duplicates after constructing the short versions of the names, it could append the minimum hash prefix necessary to disambiguate?
This sounds like a great idea to me! It indeed sounds confusing if there're two items in the list with the same name without a way to distinguish them. This should be a relatively easy change, the hardest part probably would be to decide on how to show them in a clear way (python3.7-autobahn-21.3.1.drv (z8) or ...84bn-python3.7-autobahn-21.3.1.drv or some other way).
I guess using the derivation hash rather than the output hash would probably be less surprising.
I think it would be a bit confusing if the hash prefix does not correspond to the exact store path selected. eg. if the store path shown is an output, that should be the path of the output hash; if it is a drv file it should be the derivation hash. I even think even it would be hard to implement it in any other way, as sometimes we do not know the derivation path from an output path or vice versa.
Thanks for nix-tree! It's great. I love these tools that take advantage of all the great information available from the Nix packaging system.
One thing I'd really like to use nix-tree for is to help better understand file collisions (in particular, when building Python environments).
From time to time I accidentally build a Python environment that includes two derivations of the same Python package. Sometimes this is because two upstream versions of the Python package are being included but more often the upstream version is the same and something about the Nix derivation has changed (eg, versions of dependencies).
If I use nix-tree to inspect this situation then I don't learn much because nix-tree convenient chops off the output hash portion of the store object name. Thus, I see that my Python environment includes "python3.7-autobahn-21.3.1.drv" and "python3.7-autobahn-21.3.1.drv".
It would be great if I could tell these apart in nix-tree. Perhaps if nix-tree notices there are duplicates after constructing the short versions of the names, it could append the minimum hash prefix necessary to disambiguate? For example, if one python3.7-autobahn-21.3.1.drv has an output path of /nix/store/z7zhlhp2jqiza7kwa3kdbw7vvd918gyz-python3.7-autobahn-21.3.1 and the other has an output path of /nix/store/z86hmnd5hiyqy4y2p96macy2v6qz84bn-python3.7-autobahn-21.3.1 then they could be displayed in nix-tree as "python3.7-autobahn-21.3.1.drv (z7)" and "python3.7-autobahn-21.3.1.drv (z8)".
The text was updated successfully, but these errors were encountered: