Ash Weekly: Issue #22
Official swag, 3 videos, 2 blog posts, Ash.TypedStruct, validations for read actions and huge usage_rules improvements!
Ash Weekly!
Welcome to Ash Weekly — your quick, informal digest of what’s new and notable in the world of Ash Framework. Got something cool? Drop it in the #showcase channel on Discord!
Shameless Plugs
Check out Ash Premium Support from Alembic.
Sponsor me if you like what I do. To all of my current sponsors: thank you ❤️
Official Ash T-Shirts
Thanks to OSwag, from our dear friend Lars Wikman, and an initial investment from Alembic, you can now acquire an Ash T-Shirt! They are very high quality, and you can also get Nerves and Elixir shirts there 🥳
Complex Workflows in Elixir with Reactor (+ AI Agents)
Christian Alexander, via his youtube channel Code and Stuff, has been exploring various aspects of the Ash ecosystem and his latest video on Reactor is frankly stunning. So well crafted and delivered, can’t wait to see what he does next 😉.
The Next Dimension of Developer Experience
My talk from AlchemyConf about is up! Watch me slightly fumble a very long live demo 🤣
Jax.Ex presentation on building a Discord bot with Ash AI
Barnabas (core team member and AI extraordinaire) gave a presentation at Jax.Ex showing his really awesome in-progress discord bot using Ash AI. Super cool stuff, and you get to see a lot of the nitty gritty code behind the scenes 😎
Migrating my Existing Elixir App to Ash Framework
Check out Matt Savvy’s blog post describing how he migrated his existing app to Ash, what went well and what could have gone better. Really great to see practical steps taken and advice like this.
Background AI Translator in Ash
Check out Ken’s article on building a background AI Translator in Ash! With tons of code examples and instruction for how to achieve similar results, its a great entry to the Ash media archive, and its his first article even!
Ash.TypedStruct
You’ve always been able to define typed structs using `Ash.Type.NewType`, but we’ve introduced a nice compact syntax inspired by other typed_struct packages. This one, however, is built into Ash and uses Ash’s type system, meaning it plays nicely with all the other parts of the Ash ecosystem 🎉
Validations now supported on read actions
Read actions now support validations, as well as using validations in a `where` option on preparations. Prior to this, you would have to write validations as custom preparation functions, which was verbose and prevented reusing existing elements in your system. Now you can have your cake and eat it too!
Usage Rules & documentation tasks
hexdocs.pm/usage_rules now includes powerful docs-search tasks, and instructs agents to use them for research. Please, if you are working with LLMs and Elixir, try it out. It helps even when packages haven't written usage-rules files, thanks to the new docs tools!
Ash Office Hours | July 23rd @ 7 PM EST
Be there or be square 😎
Releases
Ash: 3.5.25-3.5.28
support where clauses on preparations
support `Ash.Query` for most builtin validations
support validations on read actions
introduce `Ash.TypedStruct` as a simpler struct type
set `show_policy_breakdowns?` to `true` in dev/test by default
make `mix ash.gen.resource` merge with existing resources
allow code_interface default_options to accept a function by scottwoodall
show optional code interface inputs in usage rules
Add :bypass_all option for read action multitenancy by xantrac
add missing types to Ash.load typespec by @barnabasJ
allow pure-binary sigils in expr fragments by Frank Dugan III
add notifier trace/telemetry span type
Ash AI: 0.2.4-0.2.8
add typed struct example to usage rules & docs
support sub rules in usage rules MCP tool
Igniter: 0.6.10-0.6.20
Handle non-tty (i.e agents/scripts) far more gracefully, assuming no tty means --yes
Allow many tasks to be run just from the archive, without needing igniter as a dep in the project, including:
igniter.install
igniter.remove
igniter.add
igniter.upgrade
igniter.apply_upgrades
create git repositories when generating new projects by Albin Kocheril Chacko
include more granular information on how each item was installed
AshGraphql: 1.8.0
add domain-level pubsub configuration for subscriptions by @barnabasJ
AshJsonApi: 1.4.37
add always_include_linkage DSL option to resources by Cyprien Poisson
AshAuthentication: 4.9.5-4.9.7
Pass all args to sign_in_with_token action of password strategies by Jinkyou Son
AshAuthenticationPhoenix: 2.10.2-2.10.3
Add override options to reset and sign in forms (#641) by @jaeyson
AshPostgres: 2.6.10-2.6.11
make rollbacks safer by using `--to` instead of `-n`
AshAdmin: 0.13.11-0.13.12
Support liveview 1.1-rc
AshOban: 0.4.11
support backoff + timeout options by Roberts Guļāns
AshPaperTrail: 0.5.6
add `create_version_on_destroy?` option
AshPhoenix: 2.3.9-2.3.11
Add `to_form/2` in usage rules and improve error message when accessing a form without `to_form/2` by Kenneth Kostrešević
update usage rules with info on using `raw_errors`
Lots of new content to watch!