Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“warning” text in nix flake show output on ommiting legacyPackages disrupts visual structure inordinately #6045

Closed
schuelermine opened this issue Feb 5, 2022 · 1 comment
Labels
bug UX The way in which users interact with Nix. Higher level than UI.

Comments

@schuelermine
Copy link

Describe the bug

If you run nix flake show on a flake that has legacyPackages, they are omitted, and a warning is emitted to show this.
However, the “warning” text shifts the box drawing characters making up the tree structure to the side, disrupting the entire visual.

Steps To Reproduce

  1. Run nix flake show nixpkgs
  2. Observe:
$ nix flake show nixpkgs
github:NixOS/nixpkgs/a529f0c125a78343b145a8eb2b915b0295e4f459
├───checks
│   └───x86_64-linux
│       └───tarball: derivation 'nixpkgs-tarball-22.05pre20220131.a529f0c'
├───htmlDocs: unknown
├───legacyPackages
warning: │   ├───aarch64-darwin: omitted (use '--legacy' to show)
warning: │   ├───aarch64-linux: omitted (use '--legacy' to show)
warning: │   ├───armv6l-linux: omitted (use '--legacy' to show)
warning: │   ├───armv7l-linux: omitted (use '--legacy' to show)
warning: │   ├───i686-linux: omitted (use '--legacy' to show)
warning: │   ├───mipsel-linux: omitted (use '--legacy' to show)
warning: │   ├───x86_64-darwin: omitted (use '--legacy' to show)
warning: │   └───x86_64-linux: omitted (use '--legacy' to show)
├───lib: unknown
└───nixosModules
    └───notDetected: NixOS module

Expected behavior

github:NixOS/nixpkgs/a529f0c125a78343b145a8eb2b915b0295e4f459
├───checks
│   └───x86_64-linux
│       └───tarball: derivation 'nixpkgs-tarball-22.05pre20220131.a529f0c'
├───htmlDocs: unknown
├───legacyPackages
│   ├───aarch64-darwin: omitted (use '--legacy' to show)
│   ├───aarch64-linux: omitted (use '--legacy' to show)
│   ├───armv6l-linux: omitted (use '--legacy' to show)
│   ├───armv7l-linux: omitted (use '--legacy' to show)
│   ├───i686-linux: omitted (use '--legacy' to show)
│   ├───mipsel-linux: omitted (use '--legacy' to show)
│   ├───x86_64-darwin: omitted (use '--legacy' to show)
│   └───x86_64-linux: omitted (use '--legacy' to show)
├───lib: unknown
└───nixosModules
    └───notDetected: NixOS module
warning: some outputs not shown because they are legacy packages (use '--legacy' to show)

or similar

nix-env --version output
nix-env (Nix) 2.7.0pre20220124_0a70b37

@edolstra
Copy link
Member

edolstra commented Feb 7, 2022

Do we actually need the warning? Since it already says use '--legacy' to show.

@edolstra edolstra added the UX The way in which users interact with Nix. Higher level than UI. label Feb 7, 2022
tomberek added a commit to flox/nix that referenced this issue May 13, 2022
@tomberek tomberek closed this as completed Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug UX The way in which users interact with Nix. Higher level than UI.
Projects
Status: Done
Development

No branches or pull requests

3 participants