Skip to content

refactor: rename Edge to ComponentDep, and the flow's Edge to NodeReach - #246

Merged
mokevnin merged 4 commits into
mainfrom
refactor/component-dep
Nov 19, 2026
Merged

mokevnin merged 4 commits into
mainfrom
refactor/component-dep

Conversation

@mokevnin

Copy link
Copy Markdown
Owner

Summary

GLOSSARY.md lists "edge" under Avoid for a dependency. The code now uses dependency names for these types:

-check::Edge                  # a dependency of one component on another
+check::ComponentDep
-flow::Edge, Flow::edges      # one node of the flow reaching another
+flow::NodeReach, Flow::node_reaches
  • Variables, parameters and doc comments: those that hold a ComponentDep now say component_deps / component_dep and "dependency", not edge or import. Plain dep stays for lang::Dep. The drawn graph's arrow counts its dependencies in count.
  • Why NodeReach, not "dependency": the flow links methods through references, and the glossary says a method reached through a value is not a dependency.
  • Cargo manifest helpers: they say dependency instead of edge (deps_of, dep_list, fake_deps, add_dep).
  • Kept on purpose:
    • Mermaid's own "edge id" syntax in diagram.rs.
    • "a definition's edge" in diff.rs, which means its boundary.
    • a set the user named edge in a config test.

Closes #218

Evidence

  • Before: grep -rnw Edge src finds struct Edge in check.rs and flow.rs.
    After: nothing. mise run check is green, cargo nextest run passes 821/821, and no .snap.new appears.

Merge Danger

Door: two-way

Only names, doc comments, expect messages and test names change. No output, JSON field or snapshot changes. None of these types is serialized.

Blast Radius: none

🤖 Generated with Claude Code

mokevnin and others added 4 commits November 18, 2026 21:53
The type that carries a dependency of one component on another was called
`Edge`, a word GLOSSARY.md avoids for a dependency. It is `ComponentDep` now,
with the variables, parameters and doc comments that hold one saying
dependency, not edge or import. The flow's reference from one node to another,
also an `Edge`, is `NodeDep`, and `Flow::edges` is `Flow::node_deps`.

No behaviour, output or snapshot changes.

Closes #218

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Dep

Review of the rename: `dep` already names a `lang::Dep`, so the locals that
hold a `ComponentDep` are `component_dep`, as those of a `NodeDep` are
`node_dep`. The arrow of the drawn graph counts its dependencies in `count`.
The doc comments of `Step::file`, of the flow and of `NodeDep` say what they
hold: a line that writes a step, a node reaching another.

Refs #218

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pendency for what a file writes

Refs #218

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #218

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mokevnin
mokevnin merged commit 851feae into main Nov 19, 2026
12 checks passed
@mokevnin
mokevnin deleted the refactor/component-dep branch November 19, 2026 03:14
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.

Rename Edge to ComponentDep

1 participant