Skip to content

Commit c2a0f53

Browse files
authored
Add more links across compile documentation (#13766)
1 parent 418ab76 commit c2a0f53

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/mix/lib/mix/tasks/compile.elixir.ex

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ defmodule Mix.Tasks.Compile.Elixir do
1010
Elixir is smart enough to recompile only files that have changed
1111
and their dependencies. This means if `lib/a.ex` is invoking
1212
a function defined over `lib/b.ex` at compile time, whenever
13-
`lib/b.ex` changes, `lib/a.ex` is also recompiled.
13+
`lib/b.ex` changes, `lib/a.ex` is also recompiled. More details
14+
about dependencies between files can be found in the documentation
15+
of [`mix xref`](`Mix.Tasks.Xref`).
1416
1517
Note Elixir considers a file as changed if its source file has
1618
changed on disk since the last compilation AND its contents are

lib/mix/lib/mix/tasks/xref.ex

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defmodule Mix.Tasks.Xref do
2727
touching one file in a project causes a large subset of the project
2828
to recompile. The most common cause of these problems are the so-called
2929
"compile-connected" files. Those are files you depend on at compile-time
30-
(for example, by invoking its macro or using it in the body of amodule)
30+
(for example, by invoking its macro or using it in the body of a module)
3131
which also have their own dependencies.
3232
3333
Therefore, if your goal is to reduce recompilations, the first step is to run:
@@ -61,8 +61,8 @@ defmodule Mix.Tasks.Xref do
6161
because compile time dependencies are transitive.
6262
6363
Having compile time dependencies is a common feature in Elixir projects.
64-
However, the modules you depend on at compile-time must avoid runtime
65-
dependencies within the same project. You can understand all of the
64+
However, the modules you depend on at compile-time must avoid dependencies
65+
to modules within the same project. You can understand all of the
6666
dependencies of a given file by running:
6767
6868
$ mix xref trace lib/livebook_web.ex
@@ -75,7 +75,7 @@ defmodule Mix.Tasks.Xref do
7575
Elixir tracks three types of dependencies between modules: compile,
7676
exports, and runtime. If a module has a compile time dependency on
7777
another module, the caller module has to be recompiled whenever the
78-
callee changes (or any runtime dependency of the callee changes).
78+
callee changes (or any dependency of the callee changes).
7979
Let's see an example:
8080
8181
# lib/a.ex

0 commit comments

Comments
 (0)