Hello,
The errors produced by Elixir compiler are not consistent for some reason:
defp format_sup_data({:invalid_period, period}) do
"invalid max_seconds (period): " <> inspect(period)
end
defp format_sup_data({:invalid_max_children, max_children}) do
"invalid max_children: " <> inspect(max_children)
end
defp format_sup_data({:invalid_extra_arguments, extra}) do
"invalid extra_arguments: " <> inspect(extra)
end
defp format_sup_data(other), do: "got: #{inspect(other)}"
defp format_sup_spec({:duplicate_child_name, id}) do
"""
more than one child specification has the id: #{inspect(id)}.
If using maps as child specifications, make sure the :id keys are unique.
If using a module or {module, arg} as child, use Supervisor.child_spec/2 to change the :id, for example:
Why is there a difference in output when there is no line to print?
Doesn’t it make more sense to have a default value?
These questions are the result of This PR .
The whole issue started when I encountered the [race condition)(https://github.com/phoenixframework/phoenix/issues/1165 ) between the linter and phoenix’s live reloading mechanism. Could we have a flag that makes elixir compiler skip the binary storage? Maybe something like --dry-run.
That would be a better solution than my PR to syntastic.
Update:
That answers it:
opened 10:03PM - 12 Jan 17 UTC
closed 10:58PM - 12 Jan 17 UTC
Hi,
I want to make elixir compiler more useful for linting. There are couple of things that make it cumbersome. The first...
1 Like