Ash FrameworkAF
Ash Framework3y ago
28 replies
Myrmyr

Ash stopped working with ExMachina. Ash 2.5.10

Hello,
I've been using Ash with ExMachina successfully up to this point. Recently I've wanted to upgrade Ash from 2.5.9 to 2.6.0, alongside AshPostgres from 1.3.3 to 1.3.8. I've tested combinations of different Ash and AshPostgres combinations to narrow down the issue. It appears to be caused by Ash 2.5.10. Specifically this commit https://github.com/ash-project/ash/commit/2787b5074b8b339057af6f0bc4ee3db5abf7c60d

Our factory:
defmodule MyApp.Factory do
  @moduledoc false
  use ExMachina.Ecto, repo: MyApp.Repo

 def resource_factory do
    %MyApp.Resource{
      id: Ecto.UUID.generate(),
      name: sequence(:name, &"Resource #{&1}"),
      ...
    }
  end


When I try to do
insert(:resource, some_field: "some_value) I get the following error

** (UndefinedFunctionError) function Ash.NotLoaded.__schema__/0 is undefined or private
    (ash 2.6.0) Ash.NotLoaded.__schema__()
    iex:1: (file)


Is there any possibility to bring back the support for ExMachina?
Was this page helpful?