AshUUID - no function clause matching in AshUUID.PostgresExtension.install/1

I’m trying to install AshUUID on an app and running into the following error when trying to run ash codegen or create a migration

type or paste code here
Extension Migrations: 
** (FunctionClauseError) no function clause matching in AshUUID.PostgresExtension.install/1    
    
    The following arguments were given to AshUUID.PostgresExtension.install/1:
    
        # 1
        0
    
    Attempted function clauses (showing 1 out of 1):
    
        def install(1)
    
    (ash_uuid 0.8.0-rc.1) lib/ash_uuid/postgres_extension.ex:7: AshUUID.PostgresExtension.install/1
    (elixir 1.16.2) lib/enum.ex:1801: anonymous fn/2 in Enum.map_join/3
    (elixir 1.16.2) lib/enum.ex:4378: Enum.map_intersperse_list/3
    (elixir 1.16.2) lib/enum.ex:1801: Enum.map_join/3
    (ash_postgres 2.0.5) lib/migration_generator/migration_generator.ex:248: anonymous fn/2 in AshPostgres.MigrationGenerator.create_extension_migrations/2
    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (ash_postgres 2.0.5) lib/migration_generator/migration_generator.ex:51: AshPostgres.MigrationGenerator.generate/2
    (mix 1.16.2) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5

My versions are

defp deps do
    [
      {:phoenix, "~> 1.7.12"},
      {:phoenix_ecto, "~> 4.4"},
      {:ecto_sql, "~> 3.10"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 4.0"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:phoenix_live_view, "~> 0.20.2"},
      {:floki, ">= 0.30.0", only: :test},
      {:phoenix_live_dashboard, "~> 0.8.3"},
      {:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
      {:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
      {:heroicons,
       github: "tailwindlabs/heroicons",
       tag: "v2.1.1",
       sparse: "optimized",
       app: false,
       compile: false,
       depth: 1},
      {:swoosh, "~> 1.5"},
      {:finch, "~> 0.13"},
      {:telemetry_metrics, "~> 1.0"},
      {:telemetry_poller, "~> 1.0"},
      {:gettext, "~> 0.20"},
      {:jason, "~> 1.2"},
      {:dns_cluster, "~> 0.1.1"},
      {:bandit, "~> 1.2"},
      {:ash, "~> 3.0"},
      {:ash_postgres, "~> 2.0"},
      {:ash_phoenix, "~> 2.0"},
      {:ash_authentication, "~> 4.0.0"},
      {:ash_authentication_phoenix, "~> 2.0.0"},
      {:ash_uuid, "~> 0.8.0-rc.1"}
    ]
  end

to isolate it, I have used the example phoenix app from here Ash Framework

I have been following the example here - AshUUID — AshUuid v0.8.0-rc.1 except adding the ash resource line to the Post resource

I have tried previous versions of AshUUID but they all have the same issue.

Thanks for any guidance!

I’ve submitted a fix PR to ash_uuid. You can use that patch-1 branch until its merged.

1 Like

Thank you for the quick fix! Especially given it is the weekend. It allows me to keep moving forward!