diff --git a/README.md b/README.md index 2e019bde..da0136ae 100644 --- a/README.md +++ b/README.md @@ -37,4 +37,4 @@ Welcome! `AshPostgres` is the PostgreSQL data layer for [Ash Framework](https:// ## Reference -- [AshPostgres.DataLayer DSL](documentation/dsls/DSL:-AshPostgres.DataLayer.md) +- [AshPostgres.DataLayer DSL](documentation/dsls/DSL-AshPostgres.DataLayer.md) diff --git a/documentation/dsls/DSL:-AshPostgres.DataLayer.md b/documentation/dsls/DSL-AshPostgres.DataLayer.md similarity index 100% rename from documentation/dsls/DSL:-AshPostgres.DataLayer.md rename to documentation/dsls/DSL-AshPostgres.DataLayer.md diff --git a/lib/migration_compile_cache.ex b/lib/migration_compile_cache.ex index 7c79dcc2..c8f9108a 100644 --- a/lib/migration_compile_cache.ex +++ b/lib/migration_compile_cache.ex @@ -19,7 +19,7 @@ defmodule AshPostgres.MigrationCompileCache do Compile a file, caching the result for future calls. """ def compile_file(file) do - Agent.get_and_update(__MODULE__, fn state -> + Agent.get_and_update(__MODULE__, fn state -> new_state = ensure_compiled(state, file) {Map.get(new_state, file), new_state} end) @@ -30,9 +30,9 @@ defmodule AshPostgres.MigrationCompileCache do nil -> compiled = Code.compile_file(file) Map.put(state, file, compiled) + _ -> state end end - end diff --git a/lib/multitenancy.ex b/lib/multitenancy.ex index 2f7fd0db..fbae77fe 100644 --- a/lib/multitenancy.ex +++ b/lib/multitenancy.ex @@ -70,7 +70,7 @@ defmodule AshPostgres.MultiTenancy do "file #{Path.relative_to_cwd(file)} does not define an Ecto.Migration" end end - + defp compile_file(file) do AshPostgres.MigrationCompileCache.start_link() AshPostgres.MigrationCompileCache.compile_file(file) diff --git a/mix.exs b/mix.exs index 2558ae19..9826789a 100644 --- a/mix.exs +++ b/mix.exs @@ -97,7 +97,7 @@ defmodule AshPostgres.MixProject do "documentation/topics/advanced/expressions.md", "documentation/topics/advanced/schema-based-multitenancy.md", "documentation/topics/advanced/manual-relationships.md", - "documentation/dsls/DSL:-AshPostgres.DataLayer.md", + "documentation/dsls/DSL-AshPostgres.DataLayer.md", "CHANGELOG.md" ], groups_for_extras: [