Skip to content

Instantly share code, notes, and snippets.

@r2r-dev
Created February 19, 2024 21:09
Show Gist options
  • Save r2r-dev/d441287a37e8e021002c24f31ff70f7f to your computer and use it in GitHub Desktop.
Save r2r-dev/d441287a37e8e021002c24f31ff70f7f to your computer and use it in GitHub Desktop.
Bazel graph in terminal
git clone https://github.com/ArthurSonzogni/Diagon.git
nix-shell -p cmake -p pkgconfig -p libuuid -p boost
mkdir build
cmake Diagon -B build
cd build
make
exit
cp diagon /home/user/my-bzl-repo
cd /home/user/my-bzl-repo
nix-shell -p bazel_4 -p fzf
bazel query //... 2>/dev/null | grep -v "^@" | fzf --preview="bazel query 'deps({1})' --output graph --notool_deps 2>/dev/null| head -n-1 | tail -n+3 | sed 's/\n/, /g' | grep -v '
\"^@' | sed 's@\"@@g' | grep -v \"\@\" | ./diagon GraphDAG" --reverse --border --preview-window right:80%
@r2r-dev
Copy link
Author

r2r-dev commented Feb 19, 2024

recording4

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