Improve graph command to show only installed formulas by default, be prettier #18282

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

int3h commented Mar 6, 2013

By default, the brew graph command would output a dependency graph for every formula it knew about. Now it only outputs a dependency graph the for formulas installed. If you want to see the graph for all formulas, use brew graph --all.

Additionally, the old version of the graph command would filter out any formulas without depdency connections. The updated version now only does this if calculating dependencies for all formulas via the --all flag.

Finally, the resulting graph has been redesigned to be simpler to read. All formulas which have no other formulas depending on them (i.e., root nodes) are aligned to the left. They are also outlined in a light grey box, which is labelled "Safe to Remove". As implied, all of the formulas in this box can be safely removed without breaking other installed formulas; all formulas outside this box have at least one installed formula depending on them. This new graph style is surpressed if the --all flag is used.

Contributor

adamv commented Mar 6, 2013

"This pull request cannot be automatically merged."

This needs to be squashed to a single commit, rebased on master. For instance the superenv commit probably shouldn't be in here.

Contributor

adamv commented Mar 13, 2013

Ping

Contributor

int3h commented Apr 3, 2013

Sorry for the delay in replying (super busy month.)

I've addressed the concerns you raised in the code review. Please take a look at it and let me know there's anything else that I can do.

Contributor

adamv commented Apr 3, 2013

Thanks for the update; I'll try to review this.

Contributor

int3h commented May 21, 2013

Any updates on mainlining this? I'd love to see this feature in homebrew mainline, and delete my own repo.

@int3h int3h Changed 'graph' command to show only installed by default. Prettified…
… resulting graph.

By default, the `brew graph` command would output a dependency graph for every formula it knew about. Now it only outputs a dependency graph the for formulas installed. If you want to see the graph for all formulas, use `brew graph --all`.

Additionally, the old version of the graph command would filter out any formulas without depdency connections. The updated version now only does this if calculating dependencies for all formulas via the `--all` flag.

Finally, the resulting graph has been redesigned to be simpler to read. All formulas which have no other formulas depending on them (i.e., root nodes) are aligned to the left. They are also outlined in a light grey box, which is labelled "Safe to Remove". As implied, all of the formulas in this box can be safely removed without breaking other installed formulas; all formulas outside this box have at least one installed formula depending on them. This new graph style is surpressed if the `--all` flag is used.

Removed trailing whitespace in brew-graph file
1a04dc1
Contributor

int3h commented Jun 6, 2013

@adamv Pretty please?

Contributor

adamv commented Jun 6, 2013

Will take a look, sorry for the delay.

adamv was assigned Jun 6, 2013

adamv closed this in 49d3fcd Jun 9, 2013

Contributor

adamv commented Jun 9, 2013

Pulled, thanks! And sorry for the long delay. This is great work.

Contributor

samueljohn commented Jun 9, 2013

This is a good contribution because the complete graph is so large, it was almost unusable.

@handyman5 handyman5 pushed a commit to handyman5/homebrew that referenced this pull request Oct 7, 2013

@int3h @adamv int3h + adamv Updated `brew graph`
Changed 'graph' command to show only installed by default. Prettified
resulting graph.

By default, the `brew graph` command would output a dependency graph for every
formula it knew about. Now it only outputs a dependency graph the for formulas
installed. If you want to see the graph for all formulas, use `brew graph
--all`.

Additionally, the old version of the graph command would filter out any
formulas without depdency connections. The updated version now only does this
if calculating dependencies for all formulas via the `--all` flag.

Finally, the resulting graph has been redesigned to be simpler to read. All
formulas which have no other formulas depending on them (i.e., root nodes) are
aligned to the left. They are also outlined in a light grey box, which is
labelled "Safe to Remove". As implied, all of the formulas in this box can be
safely removed without breaking other installed formulas; all formulas outside
this box have at least one installed formula depending on them. This new graph
style is surpressed if the `--all` flag is used.

Closes #18282.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
25f40c9

@ClashTheBunny ClashTheBunny pushed a commit to ClashTheBunny/homebrew that referenced this pull request Jan 22, 2015

@int3h @mistydemeo int3h + mistydemeo Updated `brew graph`
Changed 'graph' command to show only installed by default. Prettified
resulting graph.

By default, the `brew graph` command would output a dependency graph for every
formula it knew about. Now it only outputs a dependency graph the for formulas
installed. If you want to see the graph for all formulas, use `brew graph
--all`.

Additionally, the old version of the graph command would filter out any
formulas without depdency connections. The updated version now only does this
if calculating dependencies for all formulas via the `--all` flag.

Finally, the resulting graph has been redesigned to be simpler to read. All
formulas which have no other formulas depending on them (i.e., root nodes) are
aligned to the left. They are also outlined in a light grey box, which is
labelled "Safe to Remove". As implied, all of the formulas in this box can be
safely removed without breaking other installed formulas; all formulas outside
this box have at least one installed formula depending on them. This new graph
style is surpressed if the `--all` flag is used.

Closes #18282.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
e7742df

xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.