Skip to content

Feature request: Help diagnose packages with file collisions #29

@exarkun

Description

@exarkun

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)".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions