@@ -383,13 +383,15 @@ defmodule Mix.Tasks.Xref do
383
383
lib/b.ex
384
384
lib/a.ex (compile)
385
385
386
- More precisely, `xref` is printing strongly connected cycles, which
387
- is the largest cycle possible involving these files. For this reason,
388
- files may have multiple relationships between them, and therefore the
389
- cycles are not printed in order. The label reflects the highest type
390
- of relationship between the given file and any other file in the cycle.
391
- In the example above, it means `lib/a.ex` depends on something else in
392
- the cycle at compile-time. Those are exactly the type of dependencies
386
+ More precisely, `xref` is printing the (strongly connected components)[https://en.wikipedia.org/wiki/Strongly_connected_component]
387
+ in the dependency graph, which is (roughly speaking) the largest set of
388
+ files which are part of a dependency cycle involving these files.
389
+
390
+ For this reason, files may have multiple relationships between them, and
391
+ therefore the cycles are not printed in order. The label reflects the
392
+ highest type of relationship between the given file and any other file in
393
+ the cycle. In the example above, it means `lib/a.ex` depends on something
394
+ else in the cycle at compile-time. Those are exactly the type of dependencies
393
395
we want to avoid, and you can ask `mix xref` to only print graphs with
394
396
with compile dependencies in them by passing the `--label` flag:
395
397
@@ -1264,7 +1266,9 @@ defmodule Mix.Tasks.Xref do
1264
1266
0
1265
1267
1266
1268
cycles ->
1267
- shell . info ( "#{ length ( cycles ) } cycles found. Showing them in decreasing size:\n " )
1269
+ shell . info (
1270
+ "#{ length ( cycles ) } strongly connected components (cycles) found. Showing them in decreasing size:\n "
1271
+ )
1268
1272
1269
1273
for { length , cycle } <- cycles do
1270
1274
shell . info ( "Cycle of length #{ length } :\n " )
0 commit comments