ash-project / ash

A declarative, extensible framework for building Elixir applications.
https://www.ash-hq.org
MIT License
1.45k stars 183 forks source link

PubSub DSL module option doesn't expand aliases. #1202

Open jimsynz opened 1 month ago

jimsynz commented 1 month ago

Describe the bug Specifying an alias as the module for a pub sub fails with:

** (UndefinedFunctionError) function PubSub.broadcast/3 is undefined (module PubSub is not available). Did you mean:

  * MyApp.PubSub.broadcast/3

To Reproduce

alias MyApp.PubSub

pub_sub do
  module PubSub
end

Expected behavior It publishes pubsub messages.

Runtime

Additional context Add any other context about the problem here.

zachdaniel commented 1 month ago

Strange! I can't reproduce this in spark even.

zachdaniel commented 1 month ago

Where in the module are you aliasing? It shouldn't matter, but I can't reproduce and maybe somehow that matters