Skip to content

Latest commit

 

History

History
113 lines (68 loc) · 5.37 KB

dependency-explorer.md

File metadata and controls

113 lines (68 loc) · 5.37 KB

Dependency Explorer

← Home


Purpose

Dependency Explorer is CompileScope's three-pane assembly browser: a grouped, searchable list on the left, full detail for the selected assembly in the center, and its dependency relationships on the right.

Dependency Explorer, all three panes


Layout

Three fixed panes, left to right:

Pane Width Contents
Assembly List 240 px Grouped, searchable list of every assembly
Selected Assembly Detail Fills remaining width Detail for the currently selected assembly
Relationship Viewer 300 px Depends On / Referenced By trees for the selection

Assembly List

Grouping

Every assembly is classified into exactly one of five groups, shown in this order:

Assembly list, grouped with collapsed and expanded states

Group Contains
Project Assemblies Your own code, matched against the dominant namespace prefix in the project
Test Assemblies Any assembly marked as a test assembly, regardless of origin
Unity Assemblies Unity's own built-in and package-provided assemblies
Package Assemblies Assemblies loaded from a package path that aren't Unity's own
Third Party Plugins Everything else — typically Assets/Plugins-style third-party code

Project Assemblies and Test Assemblies start expanded. Unity Assemblies, Package Assemblies, and Third Party Plugins start collapsed, since these are rarely what you're actively investigating. Click a group header to toggle it.

Search and Filtering

A search field filters the list to assemblies whose name contains the search text (case-insensitive). A Warnings only toggle restricts the list to assemblies with an active validation issue or recommendation. While either filter is active, every group is shown expanded regardless of its normal collapsed state, so a match is never hidden.

Attention Indicator

Any assembly with a validation issue or recommendation shows a small colored dot next to its name — red for a validation issue, or the recommendation's severity color otherwise.


Selected Assembly Detail

Selecting an assembly shows:

Field Source
Type Runtime, Editor-only, or Test
Scripts Script count in this assembly
Compile time Last measured compile time
Cascade score See Hot Paths for what this means
Asmdef path Project-relative path to the .asmdef file, if any
GUID The .asmdef's asset GUID, if any

Below this, the same Validation and Recommendations sections shown project-wide on Overview are repeated here, filtered to just this assembly.


Validation

CompileScope checks every assembly for two structural problems:

Issue Meaning
Circular dependency Assembly A depends on B, and B depends on A (directly or transitively), via explicit .asmdef references. Unity reports this as a compilation error.
Missing reference An assembly's .asmdef references another assembly that no longer exists in the project.

Both are shown with full detail text explaining exactly which assemblies are involved.


Relationship Viewer

For the selected assembly, shows two expandable trees:

  • Depends On — what this assembly needs to compile
  • Referenced By — what would be affected if this assembly changed

Each tree supports transitive expansion (child nodes can themselves be expanded), and correctly detects and marks cycles rather than expanding forever. A Transitive Impact summary shows the full closure size and the highest cascade score found within it — the "if I touch this, how far does it reach" answer in one number.


Reading an Edge Correctly

Every edge in the graph comes directly from an assembly's .asmdef references array — a declared dependency, not a measurement of actual code usage. If MyGame.UI lists MyGame.Core as a reference, that edge exists regardless of whether every script in MyGame.UI actually uses a type from MyGame.Core.

Edges are also marked explicit or auto-referenced — explicit references are ones added deliberately; auto-referenced ones come from Unity's automatic reference resolution for assemblies with no explicit boundary. This is why the circular-dependency check in Recommendations only considers explicit edges — an auto-referenced cycle isn't something you declared and can't be "fixed" the same way.

Depends On is what an assembly needs to compile — its own explicit and auto-referenced dependencies. If you're trying to reduce an assembly's own compile time, this is where to look for things you can remove.

Referenced By is what would be affected if that assembly changed — everything that depends on it, directly. If you're trying to understand blast radius before making a change, this is the list that matters, and it's exactly what cascade score summarizes as a single number.

Expanding nodes in either tree follows the chain further than one hop. The Transitive Impact summary gives the full closure size without manually expanding every branch — useful for a quick "how far does this actually reach" check before committing to investigating a specific path.


Related