ash-project / ash_postgres

The PostgreSQL data layer for Ash Framework
https://hexdocs.pm/ash_postgres
MIT License
134 stars 73 forks source link

After update, getting ** (Protocol.UndefinedError) protocol Enumerable not implemented for false of type Atom #370

Closed MartinElvar closed 1 month ago

MartinElvar commented 1 month ago

Describe the bug After updating my project, i went from 2.0.12 to 2.1.19 and now can't generate migrations I get the following error when running mix ash.codegen mandatory_linkedin.

Getting extensions in current project...
Running codegen for AshPostgres.DataLayer...
** (Protocol.UndefinedError) protocol Enumerable not implemented for false of type Atom. This protocol is implemented for the following type(s): DBConnection.PrepareStream, DBConnection.Stream, Date.Range, Ecto.Adapters.SQL.Stream, File.Stream, Function, GenEvent.Stream, HashDict, HashSet, IO.Stream, Iter, Jason.OrderedObject, List, Map, MapSet, Phoenix.LiveView.LiveStream, Postgrex.Stream, Range, Rewrite, Stream, StreamData
    (elixir 1.17.2) lib/enum.ex:1: Enumerable.impl_for!/1
    (elixir 1.17.2) lib/enum.ex:194: Enumerable.member?/2
    (elixir 1.17.2) lib/enum.ex:2009: Enum.member?/2
    (elixir 1.17.2) lib/enum.ex:4429: Enum.reject_list/2
    (ash_postgres 2.1.19) lib/migration_generator/migration_generator.ex:2892: AshPostgres.MigrationGenerator.identities/1
    (ash_postgres 2.1.19) lib/migration_generator/migration_generator.ex:2603: AshPostgres.MigrationGenerator.do_snapshot/3
    (ash_postgres 2.1.19) lib/migration_generator/migration_generator.ex:2596: AshPostgres.MigrationGenerator.get_snapshots/2
    (elixir 1.17.2) lib/enum.ex:4353: Enum.flat_map_list/2

I really don't know where to look, maybe someone can point me in the right direction.

zachdaniel commented 1 month ago

Fixed in latest spark.

MartinElvar commented 1 month ago

Solved by updating

 spark 2.2.15 => 2.2.16