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

Move ASCII graph to --graph switch, and add a --tree alternative & fallback #465

Merged
merged 3 commits into from Jul 6, 2020

Conversation

mosteo
Copy link
Member

@mosteo mosteo commented Jul 6, 2020

Currently we attempt to print the ASCII art box graph always at the end of alr with --solve. This has two problems: one, that when easy-graph isn't installed a warning is always emitted. Two, that when installed, that graph can quickly become too large and may difficult using the rest of the output of --solve (which may be the actual part one is interested in).

With this PR, this ASCII graph is removed from --solve and emitted stand-alone using the --graph switch, for when one is actually interested in that graph.

As a fallback for when easy-graph isn't available, a tree representation is provided:

xxx=0.0.0
├── hello=1.0.1 (^1)
│   └── libhello=1.0.1 (^1.0)
├── superhello=1.0.0 (*)
│   └── libhello=1.0.1 (~1.0)
├── unobtanium* (direct,missed) (*)
└── wip* (direct,linked,pin=/fake) (*)

This tree can also be obtained explicitly with with --tree. It shows in essence the same information than --solve, but because of the explicit branching, it may be more readable in that regard. --solve remains as the "text-only" more detailed output.

mosteo added 3 commits Jul 6, 2020
Prints dependency graph in tree form, as an alternative to the ascii-art plots
that 1) not always will be available, depending in libgraph-easy-perl and 2)
quickly become big and broken.
Previously, it was always attempted to be shown with `--solve`, which could be
an unnecessary pollution for an otherwise useful command.
@mosteo mosteo marked this pull request as ready for review Jul 6, 2020
@mosteo mosteo requested a review from Fabien-Chouteau Jul 6, 2020
@mosteo mosteo merged commit 676da56 into alire-project:master Jul 6, 2020
@mosteo mosteo deleted the feat/tree branch Jul 6, 2020
@mosteo mosteo modified the milestone: 0.7 Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants