Open
Description
Current behavior
When calling macros like Ecto.Query
, you often end up with an error message that can be cryptic, especially with beginners.
For example, the following code without adding require Ecto.Query
.
Ecto.Query.from row in Table, where: row.name == "fred"
will produce error: undefined variable "row"
This should be an error, but I think that a hint here would go a long way towards helping users understand what needs to happen.
Desired behavior
In this situation, the compiler should check to see if it is within a remote call to a macro that has not been required, and if so provide a helpful message to the user, something along the lines of:
perhaps you are missing require Ecto.Query?