omgnetwork / goban

Development environment bootstrapper for OmiseGO projects using Vagrant and Ansible.
Apache License 2.0
4 stars 1 forks source link

Replaced Kubera and Caishen with eWallet #2

Closed sirn closed 6 years ago

sirn commented 6 years ago

Phabricator: https://phabricator.omisego.io/T645

sirn commented 6 years ago

Important: run vagrant destroy prior to updating to this version. You will lose everything in the box, though.


@unnawut I'm getting this error (and few more of it) running mix test right after setting up Goban:

  7) test EWallet.Web.Paginator.fetch/3 returns a tuple of records and has_more flag (EWallet.Web.PaginatorTest)
     test/ewallet/web/paginator_test.exs:84
     ** (ExMachina.UndefinedFactoryError) No factory defined for :_account.

     Please check for typos or define your factory:

         def _account_factory do
           ...
         end

     code: ensure_num_records(Account, 10)
     stacktrace:
       (ex_machina) lib/ex_machina.ex:170: ExMachina.build/3
       (ewallet_db) test/support/factory.ex:5: EWalletDB.Factory.insert/2
       (elixir) lib/stream.ex:1303: Stream.do_repeatedly/3
       (elixir) lib/enum.ex:2423: Enum.take/2
       (ewallet) test/support/db_case.ex:25: EWallet.DBCase.ensure_num_records/4
       test/ewallet/web/paginator_test.exs:85: (test)
unnawut commented 6 years ago

Looks like the error is from the bumped Elixir version. And this code is used in a 3rd party library (thoughtbot/ex_machina). :(

Elixir 1.5:

Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Interactive Elixir (1.5.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> ~r/(?=[A-Z])/ |> Regex.split("Account") |> Enum.join("_") |> String.downcase()
"account"

Elixir 1.6:

Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (1.6.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> ~r/(?=[A-Z])/ |> Regex.split("Account") |> Enum.join("_") |> String.downcase()
"_account"
sirn commented 6 years ago

@unnawut Goban now uses Elixir 1.5.2 / OTP 20.2.2. Destroy & re-run.