From 3bc0d975a6839642c37cc09a6dac269aba264fa5 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Tue, 28 Nov 2023 13:58:11 -0500 Subject: [PATCH] chore: fix call to `compile_env!` --- lib/ash/resource/schema.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ash/resource/schema.ex b/lib/ash/resource/schema.ex index 5c14f0ad..44240447 100644 --- a/lib/ash/resource/schema.ex +++ b/lib/ash/resource/schema.ex @@ -278,7 +278,7 @@ defmodule Ash.Schema do end end - if Application.compile_env!(:ash, :allow_resources_as_types, false) do + if Application.compile_env(:ash, :allow_resources_as_types) || false do def not_a_resource!(other), do: other else @doc false @@ -309,6 +309,10 @@ defmodule Ash.Schema do Or as an array: attribute :foo, {:array, :struct}, constraints: [items: [instance_of: #{inspect(module)}]] + + You can disable this warning by setting `config :ash, allow_resources_as_types: true` in your config. + + In 3.0, the flag to disable this behaviour will not be available. """ else module