Skip to content

Commit

Permalink
Updated to work with latest Elixir beam paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwarwick committed Feb 14, 2014
1 parent 7876c14 commit 41674b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
/ebin
/_build
/deps
.depsolver.plt
erl_crash.dump
Expand Down
4 changes: 2 additions & 2 deletions lib/dialyzer.ex
Expand Up @@ -9,7 +9,7 @@ defmodule Mix.Tasks.Dialyzer do
-Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspecs
You can define a dialyzer_flags key in your Mix project config to override defaults.
You can also include a dialyzer_paths key to override default path (only ebin)
You can also include a dialyzer_paths key to override default path (only Mix.Project.app_path()/ebin)
e.g.
def project do
Expand Down Expand Up @@ -37,7 +37,7 @@ defmodule Mix.Tasks.Dialyzer do
|> join(" ")
end

defp dialyzer_paths, do: (Mix.project[:dialyzer][:paths] || ["ebin"]) |> join(" ")
defp dialyzer_paths, do: (Mix.project[:dialyzer][:paths] || [ Path.join(Mix.Project.app_path, "ebin") ]) |> join(" ")

end

7 changes: 6 additions & 1 deletion lib/dialyzer.plt.ex
Expand Up @@ -135,5 +135,10 @@ defmodule Mix.Tasks.Dialyzer.Plt do
|> is_list
end

defp ex_lib_path, do: "#{to_string(:code.lib_dir(:elixir))}/.."
defp ex_lib_path do
code_dir = Path.join(:code.lib_dir(:elixir), "..")
~w[eex elixir ex_unit iex mix]
|> Enum.map(&Path.join([ code_dir, &1, "ebin" ]))
|> Enum.join(" ")
end
end

0 comments on commit 41674b6

Please sign in to comment.