Hello,
A coworker (new to Elixir) was quite surprised today when pasting this code into IEx:
import Ecto.Query
a = DB.Resource
|> where([r], not is_nil(r.datagouv_id))
|> group_by([r], r.datagouv_id)
|> having([r], count(r.datagouv_id) > 1)
|> select([r], r.datagouv_id)
|> DB.Repo.all()
Evaluating "a" afterwards here gives an answer that surprised him: DB.Resource (yet the IEx evaluation shows the list of selected binaries, which is even more surprising).
There are fixes to that (e.g. finishing lines by |>) but I feel it is very unnatural and far away from Elixir snippets you'll find online.
Do you think it is worth opening an issue for IEx here?
Cheers,
-- Thibaut