livebook-dev / kino

Client-driven interactive widgets for Livebook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kino 0.2.2 and ecto

fhunleth opened this issue · comments

After updating to kino 0.2.2, I started getting compile errors:

==> kino
Compiling 13 files (.ex)

== Compilation error in file lib/kino/ecto.ex ==
** (CompileError) lib/kino/ecto.ex:28: module Ecto.Query is not loaded and could not be found

The workaround for this isn't that hard, depend on :ecto_sql, but I wasn't sure if you wanted to make :ecto_sql a hard dependency or something else.

This also looks like it breaks the kino examples in Livebook right now as well.

Thanks @fhunleth! I have pushed a fix and published v0.2.3.

@jonatanklosko the fix adds an integration test and, once we add the integration test, I started getting failures from the Ecto suite. This is likely happening because in your tests you had after 1000 -> ..., but the suite never took more than a second, so these assertions never ran. Therefore, for the tests that are using the MockRepo, you should likely add a on_exit(fn -> ... end) callback that ensures the MockRepo has all of its assertions asserted before the next test starts.

v0.2.3 works for me. Thanks @josevalim for the super quick fix!

I will leave it open so @jonatanklosko review things and he closes if he is satisfied. :)

@josevalim thanks for the quick fix, the changes look good to me :) I created #36 to fix the tests.