https://pantsbuild.org/ logo
#development
Title
# development
c

careful-address-89803

11/05/2022, 6:15 PM
hiyas, the
--engine-visualize-to
has some nodes that are colour-coded. What do the colours correspond to?
e

enough-analyst-54434

11/05/2022, 7:32 PM
I didn't know the answer either so I searched for "visualize_to" and followed some breadcrumbs to a rust Palette enum:
Copy code
$ git grep -C2 "Palette::" src/rust/
src/rust/engine/rule_graph/src/lib.rs-      // Color "singleton" entries (with no params)!
src/rust/engine/rule_graph/src/lib.rs-      if e.params().is_empty() {
src/rust/engine/rule_graph/src/lib.rs:        Some(Palette::Olive.fmt_for_graph(display_args))
src/rust/engine/rule_graph/src/lib.rs-      } else {
src/rust/engine/rule_graph/src/lib.rs-        // Color "intrinsic" entries (provided by the rust codebase)!
--
src/rust/engine/rule_graph/src/lib.rs-    &Entry::Param(_) => {
src/rust/engine/rule_graph/src/lib.rs-      // Color "Param"s.
src/rust/engine/rule_graph/src/lib.rs:      Some(Palette::Orange.fmt_for_graph(display_args))
src/rust/engine/rule_graph/src/lib.rs-    }
src/rust/engine/rule_graph/src/lib.rs-  };
--
src/rust/engine/rule_graph/src/lib.rs-            "    \"{}\" {}\n{}    \"{}\" -> {{{}}}",
src/rust/engine/rule_graph/src/lib.rs-            root_str,
src/rust/engine/rule_graph/src/lib.rs:            Palette::Blue.fmt_for_graph(display_args),
src/rust/engine/rule_graph/src/lib.rs-            deps_with_attrs,
src/rust/engine/rule_graph/src/lib.rs-            root_str,
--
src/rust/engine/src/tasks.rs-    match self {
src/rust/engine/src/tasks.rs-      Rule::Task(_) => None,
src/rust/engine/src/tasks.rs:      Rule::Intrinsic(_) => Some(rule_graph::Palette::Gray),
src/rust/engine/src/tasks.rs-    }
src/rust/engine/src/tasks.rs-  }
So it looks like: + Olive: singletons + Orange: Params + Blue: rule graph roots + Gray: intrinsic rules + <else>: plain old rules
c

careful-address-89803

11/05/2022, 7:33 PM
neat, thanks!