-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move c:process_name/2 to the Broadway behaviour #285
Conversation
It seems like this callback was accidentally generated inside the module calling "use Broadway" instead of being part of the Broadway behaviour. This callback was originally introduced in #239.
end | ||
|
||
""" | ||
@doc since: "1.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to put 1.1.0 here because it's never been available publicly before and I needed a minor version bump to introduce a new feature.
defp default_process_name(broadway_name, base_name) when is_atom(broadway_name) do | ||
:"#{broadway_name}.Broadway.#{base_name}" | ||
end | ||
|
||
defp default_process_name(broadway_name, _base_name) do | ||
raise ArgumentError, """ | ||
expected Broadway to be started with an atom :name, got: #{inspect(broadway_name)} | ||
|
||
module.process_name(broadway_name, base_name) | ||
If starting Broadway with a :name that is not an atom, you must define the \ | ||
process_name/2 callback in the module which calls "use Broadway" (see the documentation). | ||
""" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the default implementation here, with the function_exported?/3
check.
Could we get a release pushed to hex for this since it fixes a breaking change for those using the |
@kdawgwilk just released v1.0.3. 👍 |
It seems like this callback was accidentally generated inside the module calling
use Broadway
instead of being part of the Broadway behaviour.This callback was originally introduced in #239.