atlas icon indicating copy to clipboard operation
atlas copied to clipboard

Unclear error on elixir 0.14.2

Open stchris opened this issue 11 years ago • 2 comments

Hi,

I was trying my best to make atlas work on elixir 0.14.2, updating the few deprecated calls, which happened mostly in the 0.14.0 release.

Now it compiles for me, but running the tests results in:

test/persistence_test_helper.exs:4: warning: the guard for this clause evaluates to 'false'
test/persistence_test_helper.exs:19: warning: the guard for this clause evaluates to 'false'
** (CompileError) test/database/client_test.exs:5: undefined function teardown_all/1
    (elixir) src/elixir.erl:195: :elixir.quoted_to_erl/3

I believe the guard-related warnings are the issue (which is why the persistence helper doesn't get compiled), but the line numbers in persistence_test_helper.exs are misleading. They point to modules which extend Atlas.Model, so I'm now quite sure which guard they refer to.

Can anyone point me in the right direction, please? I'd obviously submit a pull request as soon as it works. Thanks!

stchris avatar Jul 07 '14 12:07 stchris

teardown_all needs to be updated to on_exit and we should be good

chrismccord avatar Jul 07 '14 12:07 chrismccord

Hmm, by making that change I now get this error and I don't quite understand where it's coming from:

test/persistence_test_helper.exs:4: warning: the guard for this clause evaluates to 'false'
test/persistence_test_helper.exs:19: warning: the guard for this clause evaluates to 'false'
test/database/client_test.exs:6: warning: unused alias Client
** (CompileError) test/database/client_test.exs:5: undefined function drop_table/0
    (stdlib) lists.erl:1352: :lists.mapfoldl/3
    (stdlib) lists.erl:1353: :lists.mapfoldl/3

I pushed the changes to my fork, in case you want to have a look and comment on them: https://github.com/stchris/atlas/compare/ex0.14.2?expand=1

stchris avatar Jul 07 '14 22:07 stchris