ek9_query_module_dependencies

Answers first: status, moduleCount, edgeCount, hasCycles, then modules[] {name, files, constructCount}, dependencies[] {from, to, referenceCount, kinds} and metrics (fan-in/out, cycles).

Category: Enquiry · Compare: Module Dependencies Analyzer (IntelliJ)

When to use it

'Which modules depend on which, and are there cycles' is one call with no arguments - the whole-workspace module graph.

When not to use it

Details

Empty workspace is status:ok (moduleCount:0, cycles:[]), not an error. dependencies[].kinds are STRUCTURAL (extends, implements, field_type, return_type, parameter_type), not import labels; referenceCount is coupling strength. metrics.cycles is the canonical cycle signal (empty array = none) — do NOT infer cycles from stronglyConnectedComponents, which equals moduleCount in an acyclic graph.

Arguments

ArgumentTypeRequiredWhat it is
includeBuiltinsbooleanWhether to include org.ek9.lang built-in module dependencies (default false)

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it.

Module dependencies shape

Request

{ }

Response

{
  "dependencies" : [ ],
  "edgeCount" : 0,
  "hasCycles" : false,
  "meta" : {
    "serverMs" : "<timing>"
  },
  "metrics" : {
    "averageFanIn" : 0.0,
    "averageFanOut" : 0.0,
    "cycles" : [ ],
    "hasCycles" : false,
    "maxFanIn" : 0,
    "maxFanOut" : 0,
    "stronglyConnectedComponents" : 1
  },
  "moduleCount" : 1,
  "modules" : [ {
    "constructCount" : 1,
    "files" : [ "MyRecord.ek9" ],
    "name" : "com.example"
  } ],
  "status" : "ok"
}