Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Using a type defined in another module implies in compile-time dependency #5087
While debugging recompilation issues in my project I noticed that whenever we
For example, if we have something like this:
## type_a.ex defmodule TypeA do @type t :: integer end ## type_c.ex defmodule TypeC do @type t :: integer end ## type_b.ex defmodule TypeB do @spec a() :: TypeA.t def a, do: () @spec c() :: TypeC.t def c, do: () end
I will end up with the following dependency graph:
This contributes to unnecessary re-compilation. Because of this, some "cycles"
I have been able to reproduce this behavior in both v1.3.2 and v1.2.6.
(I have created a repository to
I have talked with @josevalim over IRC about this and it seems to him that this