Open CarterFendley opened 3 months ago
An enum might be better here:
pub enum NodeType {
Terminal,
Intermediate(String)
}
Intermediate
isn't a great name, but this sort of setup paired with match
statements on node type can allow you to explicitly handle different node types in different ways
Currently we use
<terminal>
to represent the "module name" for source code which is passed toGraphBuilder.build(...)
. We reference this at a couple of points in the code by a literal, which is just asking for trouble. Additionally we use the same<terminal>
literal to represent the "package" for that source code, which may be confusing.Uses for "name"
<terminal>
updated here but having updated in the first instance will break caching in a really bad silent failure way.Uses for "package"