Ash 3.1 Released!
Major themes
Generators! These are just the first entries into a powerful new suite of tools. Check out the generator docs for more! Ash and AshPostgres now have installers and generators powered by Igniter. We think that igniter is going to be a very big deal, expect to see a blog post, more updates to igniter, and installers & generators for each Ash package!
Built in UUIDv7 support: the type :uuid_v7
has been added to core, in addition to a uuid_v7_primary_key :name
attribute builder. Thanks @moissela!
In addition, weâve been hard at work cleaning up bugs, improving DX and smoothing out sharp edges.
Big Picture
One thing I wanted to touch on as part of this announcement, is the idea of âAsh 4.0â. Before those of you who have just done the 3.0 upgrade jump out of your seats, Iâd like to explain that there are no current plans for a 4.0 version of Ash. It may happen in the future, if there are breaking changes that absolutely must go in, but if it ever does it will be 5-10% as big as the update from 2.0 â 3.0.
Ash core is, for the most part, now âfeature completeâ. There are tons of improvements that can be made to various subsystems, optimizations, nobs and dials added, etc. But the general shape of Ash as of 3.0 will be the general shape of Ash for many years to come.
Now we get to focus our efforts more on the Ash & Elixir ecosystem!
We hope this comes as good news to our users
Changelog
Features:
-
[Generators] add
mix ash.install
(call withmix igniter.install ash
) -
[Generators] add
mix ash.gen.resource
-
[Generators] add
mix ash.gen.base_resource
-
[Generators] add
mix ash.gen.domain
-
[Generators] add
mix ash.extend
-
[Ash.Type.UUIDv7] Add built in
Ash.Type.UUIDv7
type, anduuid_v7_primary_key
builder
Bug Fixes:
-
[atomics] sort primary key changes ahead of others in atomic changes
-
[Ash.Changeet] fix typespec for Changeset.around_transaction/2 (#1292)
-
[multitenancy] ensure tenancy is always enforced on create/update/destroy actions
-
[loading relationships] lateral join on
from_many? true
relationships -
[calculations] donât reuse calculations/aggregates if
authorize?
is true -
[aggregates] ensure aggregate context is fully configured in
Ash.aggregate
-
[bulk actions] properly transfer changeset.context on streamed batch changesets
-
[bulk actions] ensure notifications are dispatched from bulk actions
-
[lazy loading] lazy-loading logic for calculations/aggregates was inversed (#1275)
-
[error handling] properly match on async task exceptions
-
[policies] ensure
context
is available in policy template expressions -
[policies] ensure forbidden errors behave the same when using implicit bulk version of code interface functions
-
[manual relationships] compare keys in manual relationships when using âcomplexâ types (#1270)
-
[Ash.Filter] cover more cases in filter input parsing (#1261)
-
[has_one relationships] automatically set
from_many?
if ahas_one
has asort
applied -
[Ash.Filter] fix match error when synthesizing joins across data layers
-
[Ash.DataLayer.Ets] properly support multitenancy when referencing relationships
-
[Ash.Type.Union] initialize & validate each subtype of a union
Improvements:
-
[Ash.Type.Enum] allow overriding
cast_stored/2
anddump_to_native/2
-
[Ash.DataLayer.Simple] support offset in the simple data layer
-
[Ash.Changeset] allow after_action hooks in fully atomic changesets