pigeon
pigeon copied to clipboard
Elixir 1.12 Supervisor Deprecation
Environment
- Elixir 1.12.3 (compiled with Erlang/OTP 24)
- Operating system: Mac OS Monterey (12.0.1)
Current behavior
When upgrading our Elixir version from 1.11 to 1.12, we started seeing deprecation warnings around how Pigeon was starting supervisors:
warning: Supervisor.Spec.worker/3 is deprecated. Use the new child specifications outlined in the Supervisor module instead
lib/pigeon/fcm.ex:167: Pigeon.FCM.start_connection/1
warning: Supervisor.Spec.worker/3 is deprecated. Use the new child specifications outlined in the Supervisor module instead
lib/pigeon/apns.ex:128: Pigeon.APNS.start_connection/1
warning: Supervisor.Spec.worker/3 is deprecated. Use the new child specifications outlined in the Supervisor module instead
lib/pigeon/adm.ex:159: Pigeon.ADM.start_connection/1
warning: Supervisor.Spec.supervisor/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
lib/pigeon.ex:38: Pigeon.task_supervisors/0
warning: Supervisor.Spec.worker/3 is deprecated. Use the new child specifications outlined in the Supervisor module instead
Found at 5 locations:
lib/pigeon.ex:34: Pigeon.apns_token_agent/0
lib/pigeon.ex:58: Pigeon.worker/1
lib/pigeon.ex:62: Pigeon.worker/1
lib/pigeon.ex:85: Pigeon.workers_for/3
lib/pigeon.ex:104: Pigeon.start_connection/1
I'm wondering if there is any workaround to these deprecation warnings or if we need to care about them at all?
Expected behavior
Pigeon would compile successfully and work with Elixir 1.12.
This appears to be fixed in the v2 release candidates.