ash icon indicating copy to clipboard operation
ash copied to clipboard

PubSub DSL module option doesn't expand aliases.

Open jimsynz opened this issue 1 year ago • 2 comments

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

  • Elixir version: 1.16.3
  • Erlang version: 27.0
  • OS: Darwin Eeloo 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
  • Ash version: 3.0.2
  • any related extension versions

Additional context Add any other context about the problem here.

jimsynz avatar May 26 '24 07:05 jimsynz

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

zachdaniel avatar May 27 '24 13:05 zachdaniel

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

zachdaniel avatar May 27 '24 13:05 zachdaniel